pack vocabulary
Factor handbook ยป Vocabulary index


Documentation
Packing and Unpacking Binary Data

Metadata
Authors:Doug Coleman


Words

Tuple classes
ClassSuperclassSlots
packed-read-fail tuplestr bytes


Generic words
WordStack effect
>n-byte-array( obj n -- byte-array )


Macro words
WordStack effect
pack( str -- quot )
unpack( str -- quot )


Ordinary words
WordStack effect
ch>packed-length( ch -- n )
pack-be( seq str -- bytes )
pack-le( seq str -- bytes )
pack-native( seq str -- bytes )
packed-length( str -- n )
packed-read-fail( str bytes -- * )
read-packed( str quot -- seq )
read-packed-be( str -- seq )
read-packed-le( str -- seq )
read-packed-native( str -- seq )
s128>byte-array( n -- byte-array )
s16>byte-array( n -- byte-array )
s24>byte-array( n -- byte-array )
s32>byte-array( n -- byte-array )
s64>byte-array( n -- byte-array )
s8>byte-array( n -- byte-array )
u128>byte-array( n -- byte-array )
u16>byte-array( n -- byte-array )
u24>byte-array( n -- byte-array )
u32>byte-array( n -- byte-array )
u64>byte-array( n -- byte-array )
u8>byte-array( n -- byte-array )
unpack-be( bytes str -- seq )
unpack-le( bytes str -- seq )
unpack-native( bytes str -- seq )
write-c-string( byte-array -- byte-array )
write-double( n -- byte-array )
write-float( n -- byte-array )


Class predicate words
WordStack effect
packed-read-fail?( object -- ? )


Files


Metadata files