pack vocabulary - Factor Documentation (original) (raw)

pack vocabulary
Factor handbook » Vocabulary index

Documentation
Packing and Unpacking Binary Data

Metadata

Authors: Doug Coleman

Words

Tuple classes

Class Superclass Slots
packed-read-fail tuple str bytes

Generic words

Word Stack effect
>n-byte-array ( obj n -- byte-array )

Macro words

Word Stack effect
pack ( str -- quot )
unpack ( str -- quot )

Ordinary words

Word Stack 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

Word Stack effect
packed-read-fail? ( object -- ? )

Files

resource:basis/pack/pack.factor
resource:basis/pack/pack-docs.factor
resource:basis/pack/pack-tests.factor

Metadata files

resource:basis/pack/authors.txt
resource:basis/pack/summary.txt