An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# Shoco.jl

[![Build Status](https://github.com/ararslan/Shoco.jl/workflows/CI/badge.svg)](https://github.com/ararslan/Shoco.jl/actions?query=workflow%3ACI+branch%3Amaster)
[![codecov.io](http://codecov.io/github/ararslan/Shoco.jl/coverage.svg?branch=master)](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 ⎨