Shoco.jl is a Julia package that provides access to the compression and decompression functions in the Shoco C library. The algorithms are optimized for short strings and perform well in comparison to smaz, gzip, and xz. Compression is performed using entropy encoding.
Two functions are exported by this package:
Both accept a single
AbstractString argument and return a
It's important to note that the output from
compress may not be valid UTF-8, which the
String type doesn't care about, but your use case might.
Here's an example using the functions at the REPL.
julia> using Shoco julia> compress("what's happening") "؉'s ⎨<g" julia> decompress("؉'s ⎨<g") "what's happening"
The Shoco C library does not work on Windows due to lack of C99 support, which means that this package has the same restriction.