Skip to content
zlib codecs for TranscodingStreams.jl.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
deps
src
test
.codecov.yml
.gitignore
.travis.yml run CI on Julia 1.1 (#41) Mar 2, 2019
LICENSE.md
README.md
REQUIRE
appveyor.yml

README.md

CodecZlib.jl

TravisCI Status AppVeyor Status codecov.io

Installation

Pkg.add("CodecZlib")

Usage

using CodecZlib

# 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 = GzipCompressorStream(IOBuffer(text))
for line in eachline(GzipDecompressorStream(stream))
    println(line)
end
close(stream)

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

This package exports following codecs and streams:

Codec Stream
GzipCompressor GzipCompressorStream
GzipDecompressor GzipDecompressorStream
ZlibCompressor ZlibCompressorStream
ZlibDecompressor ZlibDecompressorStream
DeflateCompressor DeflateCompressorStream
DeflateDecompressor DeflateDecompressorStream

See docstrings and TranscodingStreams.jl for details.

You can’t perform that action at this time.