Handbook
Glossary
compress ( byte-array -- byte-array' )
Compression (ZLIB)
Next:
uncompress ( byte-array -- byte-array' )
Vocabulary
compression
.
zlib
Inputs
byte-array
a
byte-array
Outputs
byte-array'
a
byte-array
Word description
Returns a byte-array of compressed bytes.
Definition
USING:
accessors
alien.c-types
alien.data
byte-vectors
compression.zlib.ffi
kernel
sequences
;
IN:
compression.zlib
:
compress
( byte-array -- byte-array' )
[
compressed-size
[
<byte-vector>
dup
underlying>>
]
keep
ulong
<ref>
]
keep
[
dup
length
compress
zlib-error
]
keepd
ulong
deref
>>length
B{
}
like
;