https://github.com/gbaraldi/unishox.jl
Julia package for the unishox string compression library
https://github.com/gbaraldi/unishox.jl
compression julia strings-manipulation
Last synced: 10 months ago
JSON representation
Julia package for the unishox string compression library
- Host: GitHub
- URL: https://github.com/gbaraldi/unishox.jl
- Owner: gbaraldi
- License: mit
- Created: 2021-11-03T20:23:25.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-12T19:55:57.000Z (over 4 years ago)
- Last Synced: 2025-08-03T12:41:33.165Z (11 months ago)
- Topics: compression, julia, strings-manipulation
- Language: Julia
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unishox
[](https://github.com/gbaraldi/Unishox.jl/actions?query=workflow%3ACI+branch%3Amaster)
[](http://codecov.io/github/gbaraldi/Unishox.jl?branch=main)
**Unishox.j;** is a Julia package that provides access to the compression and decompression functions in the [**Unishox**](https://github.com/siara-cc/Unishox2) 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**](https://github.com/siara-cc/Unishox2/blob/master/Unishox_Article_2.pdf?raw=true)
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
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**](https://github.com/ararslan/Shoco.jl) package.