https://github.com/ararslan/shoco.jl
Julia wrapper for the shoco string compression C library
https://github.com/ararslan/shoco.jl
compression julia strings
Last synced: over 1 year ago
JSON representation
Julia wrapper for the shoco string compression C library
- Host: GitHub
- URL: https://github.com/ararslan/shoco.jl
- Owner: ararslan
- License: mit
- Created: 2016-03-10T05:38:41.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-10-21T23:01:50.000Z (over 4 years ago)
- Last Synced: 2025-02-22T18:05:45.681Z (over 1 year ago)
- Topics: compression, julia, strings
- Language: Julia
- Size: 23.4 KB
- Stars: 9
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Shoco.jl
[](https://github.com/ararslan/Shoco.jl/actions?query=workflow%3ACI+branch%3Amaster)
[](http://codecov.io/github/ararslan/Shoco.jl?branch=master)
**Shoco.jl** is a Julia package that provides access to the compression and decompression functions in the [**Shoco**](https://github.com/Ed-von-Schleck/shoco) C library.
The algorithms are optimized for short strings and perform well in comparison to [smaz](https://github.com/antirez/smaz), [gzip](https://en.wikipedia.org/wiki/Gzip), and [xz](https://en.wikipedia.org/wiki/Xz).
Compression is performed using [entropy encoding](https://en.wikipedia.org/wiki/Entropy_encoding).
Two functions are exported by this package: `compress` and `decompress`.
Both accept a single `AbstractString` argument and return a `String`.
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
julia> using Shoco
julia> compress("what's happening")
"؉'s ⎨ decompress("؉'s ⎨