Contents

Overview

Applications that read and manipulate binary data also require the ability to encode and decode that data into easily recognizable primitive types. This spec aims to solve this problem by exposing encoding, decoding, and byte order operations on the Ti.Codec module.

Numbers / widths

This is a list of the accepted encoding types for numbers, and their corresponding width in bytes

Name

Encoding Type

Width in bytes

byte

integer

1

short

integer

2

int

integer

4

float

single precision floating-point

4

long

integer

8

double

double precision floating-point

8

Byte Order

Depending on the use of a Ti.Buffer, different underlying primitive byte orders may be required to support various architectures. The standard byte orders are:

Byte Order should only matter for operations on multi-byte primitive values ("Numbers")

Proposed API

Ti Module

Ti Module Methods

Ti.Codec Module

Ti.Codec Constants

Ti.Codec Methods