No description, website, or topics provided.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
deps
docs
src Updates to work with julia v1.0 (#18) Sep 20, 2018
test
.appveyor.yml
.gitignore
.travis.yml
LICENSE
README.md
REQUIRE

README.md

CodecLz4

Stable Latest Build Status Build Status CodeCov

Provides transcoding codecs for compression and decompression with LZ4. Source: LZ4 The compression algorithm is similar to the compression available through Blosc.jl, but uses the LZ4 Frame format as opposed to the standard LZ4 or LZ4_HC formats.

Installation

Pkg.add("CodecLz4")

Usage

using CodecLz4

# Some text.
text = """
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sollicitudin
mauris non nisi consectetur, a dapibus urna pretium. Vestibulum non posuere
erat. Donec luctus a turpis eget aliquet. Cras tristique iaculis ex, eu
malesuada sem interdum sed. Vestibulum ante ipsum primis in faucibus orci luctus
et ultrices posuere cubilia Curae; Etiam volutpat, risus nec gravida ultricies,
erat ex bibendum ipsum, sed varius ipsum ipsum vitae dui.
"""

# Streaming API.
stream = LZ4CompressorStream(IOBuffer(text))
for line in eachline(LZ4DecompressorStream(stream))
println(line)
end
close(stream)

# Array API.
compressed = transcode(LZ4Compressor, text)
@assert sizeof(compressed) < sizeof(text)
@assert transcode(LZ4Decompressor, compressed) == Vector{UInt8}(text)

The API is heavily based off of CodecZLib, and uses TranscodingStreams.jl. See those for details.