Something went wrong. Try again.
Gleam bindings to Erlang's zstd module regular.hexdocs.pm
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768import gleeunitimport regular
pub fn main() -> Nil { gleeunit.main()}
pub fn compress_test() { let decompressed = <<"Hello, world!!!">> assert regular.compress(decompressed) == Ok(<< 0x28, 0xb5, 0x2f, 0xfd, 0x20, 0x0f, 0x79, 0x00, 0x00, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x21, 0x21, 0x21, >>)}
pub fn decompress_test() { let compressed = << 0x28, 0xb5, 0x2f, 0xfd, 0x20, 0x0f, 0x79, 0x00, 0x00, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x21, 0x21, 0x21, >> assert regular.decompress(compressed) == Ok(<<"Hello, world!!!">>)}