Skip to content

Julia package for the unishox string compression library

License

Notifications You must be signed in to change notification settings

gbaraldi/Unishox.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unishox

Build Status codecov.io

Unishox.j; is a Julia package that provides access to the compression and decompression functions in the Unishox C library. It's algorithms are optimized for short Unicode strings. Compression is performed using an hybrid encoder that uses entropy, dictionary and delta encoding. For more details check the article

Two functions are exported by this package: compress and decompress. Both accept a single AbstractString argument and return a String.

Here's an example using the functions at the REPL.

julia> using Unishox

julia> s = "😆I can do emojis"
"😆I can do emojis"

julia> sizeof(s)
19

julia> compressed = compress(s)
"\x9f\xc0R\xe3\x05\xaeg\x17T\x9f\x9a\xfd\xbd\x17"

julia> sizeof(compressed)
14

julia> decompress(compressed)
"😆I can do emojis"

This package is based on the Shoco.jl package.