• Stars
    star
    27
  • Rank 876,442 (Top 18 %)
  • Language
    Julia
  • License
    Other
  • Created over 8 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Fast, flexible zlib bindings.

Build Status Build status codecov.io

NOTE: If you are starting a new project on Julia 0.6 or later, it is recommended to use the CodecZlib.jl package instead. CodecZlib.jl and other packages offer more unified interfaces for a wide range of file formats.

This is yet another zlib interface for Julia. It's intended to replace the two prior zlib packages.

Both have shortcomings that this package aims to address, specifically:

  • Zlib.jl is very slow.
  • GZip.jl is not as slow as Zlib.jl, but still slower than it could to be.
  • GZip.jl only supports file I/O.
  • GZip.jl doesn't support reading/writing plain zlib data.

API

This library exports four stream types:

Type Description
ZlibInflateOutputStream write and decompress data
ZlibDeflateOutputStream write and compress data
ZlibInflateInputStream read and decompress data
ZlibDeflateInputStream read and compress data

These work like regular IO objects. Each takes as a parameter either in input or output source.

Examples

# read lines from a compressed file
for line in eachline(open("data.txt.gz") |> ZlibInflateInputStream)
    # do something...
end

# write compressed data to a file
io = open("data.txt.gz", "w")
stream = ZlibDeflateOutputStream(io)
for c in rand(UInt8, 10000)
    write(stream, c)
end
close(stream)  # this closes not only `stream` but also `io`

# pointlessly compress and decompress some data (use `read` on v0.5)
readbytes(rand(UInt8, 10000) |> ZlibDeflateInputStream |> ZlibInflateInputStream)

Other functions

There are convenience Libz.inflate(::Vector{UInt8}) and Libz.deflate(::Vector{UInt8}) functions that take a byte array and return another compressed or decompressed byte array.

Checksum functions are exposed as Libz.crc32(::Vector{UInt8}) and Libz.adler32(::Vector{UInt8}).

See BufferedStreams.jl for benchmarks of this library.

Low-level APIs are defined in src/lowlevel.jl. These constants and functions are not exported but available if necessary. At the moment, function wrappers are minimal but feel free to add and send functions you need as pull requests.

More Repositories

1

Bio.jl

[DEPRECATED] Bioinformatics and Computational Biology Infrastructure for Julia
Julia
257
star
2

Automa.jl

A julia code generator for regular expressions
Julia
176
star
3

BioSequences.jl

Biological sequences for the julia language
Julia
136
star
4

BioStructures.jl

A Julia package to read, write and manipulate macromolecular structures (particularly proteins)
Julia
81
star
5

GenomeGraphs.jl

A modern genomics framework for julia
Julia
60
star
6

BioAlignments.jl

Sequence alignment tools
Julia
56
star
7

BioMakie.jl

Plotting and interface tools for biology.
Julia
49
star
8

FASTX.jl

Parse and process FASTA and FASTQ formatted files of biological sequences.
Julia
48
star
9

PopGen.jl

Population Genetics in Julia
Julia
43
star
10

IntervalTrees.jl

A data structure for efficient manipulation of sets of intervals
Julia
42
star
11

BioFmtSpecimens

A collection of bioinformatics file format specimens to test against
Roff
37
star
12

GeneticVariation.jl

Datastructures and algorithms for working with genetic variation
Julia
35
star
13

GenomicFeatures.jl

Tools for genomic features in Julia.
Julia
29
star
14

BioCore.jl

Core types and interfaces for BioJulia packages
Julia
29
star
15

BioTutorials

Tutorial Notebooks of BioJulia
Jupyter Notebook
28
star
16

BioSymbols.jl

Nucleic and amino acid primitive types
Julia
28
star
17

XAM.jl

Parse and process SAM and BAM formatted files
Julia
23
star
18

FMIndexes.jl

FM-index for full-text search
Julia
19
star
19

BioServices.jl

Julia interface to APIs for various bio-related web services
Julia
19
star
20

Kmers.jl

In development: Kmer types and methods for julia
Julia
17
star
21

SubstitutionModels.jl

Biological Sequence Substitution Models for Julia
Julia
16
star
22

Contributing

Documentation, guidelines, and policy on contributing to all BioJulia repositories
14
star
23

GenomicAnnotations.jl

Julia
13
star
24

BGZFStreams.jl

BGZF Stream
Julia
13
star
25

IndexableBitVectors.jl

Fully indexable dictionaries - access/rank/select operations
Jupyter Notebook
12
star
26

SingleCellProjections.jl

Analysis of Single Cell Expression data in Julia
Julia
12
star
27

KmerAnalysis.jl

K-mer counting algorithms and count-data utilities for the BioJulia framework
Julia
11
star
28

ReadDatastores.jl

Datastores for reads, not your papa's FASTQ files.
Julia
11
star
29

Codecs.jl

Common data encoding algorithms
Julia
11
star
30

WaveletMatrices.jl

The Wavelet Matrix
Julia
10
star
31

BioGenerics.jl

Generic methods, types and modules for the BioJulia ecosystem.
Julia
10
star
32

GenomeBrowsers.jl

Julia
10
star
33

FormatSpecimens.jl

Biological file format specimens for testing packages, and functions to assist in testing.
Julia
10
star
34

BioJuliaRegistry

The BioJulia package registry
9
star
35

BioFetch.jl

Easily fetch biological sequences from online sources
Julia
9
star
36

TwoBit.jl

Support for working with 2Bit formatted sequence data files
Julia
9
star
37

Phylogenies.jl

The BioJulia package for working with phylogenetic trees and geneologies.
Julia
8
star
38

SequenceVariation.jl

Biological sequence variation
Julia
8
star
39

PopGen.jl_archive

Population Genetics functions in Julia.
Julia
8
star
40

GFF3.jl

Julia
7
star
41

MMTF.jl

A julia package to parse and write MMTF file
Julia
7
star
42

biojulia.github.io

BioJulia's Website
HTML
7
star
43

PopGenCore.jl

Core utilities for PopGen.jl, including the PopData type and file IO
Julia
6
star
44

BED.jl

Julia
5
star
45

NaturalSelection.jl

A package containing methods for looking at the effects of natural selection
Julia
5
star
46

CWL.jl

Utilities for working with the Common Workflow Language (CWL) from Julia
5
star
47

talks

Slides and materials for talks about BioJulia
Jupyter Notebook
5
star
48

Dat.jl

Types and methods for interacting with Dat from the Julia REPL and programs.
4
star
49

BigWig.jl

Julia
4
star
50

biojulia_handbook

4
star
51

MicrobiomePlots.jl

Julia
3
star
52

BBI.jl

Julia
3
star
53

BigBed.jl

Julia
3
star
54

BioJuliaDocs

Julia
3
star
55

BioBridgeR.jl

Compatibility between R classes and BioJulia types for bioinformatics
Julia
3
star
56

ragel7

Ragel 7 fork with a few Julia fixes
C++
2
star
57

ReferenceSequences.jl

Data structure for reference sequences
Julia
2
star
58

WAHVectors.jl

Compress bit vectors using the Word Aligned Hybrid method.
Julia
2
star
59

KmerAnalysisMakie.jl

Makie recpies for visualising KmerAnalysis types and results.
Julia
2
star
60

assets

Logos and other assets
JavaScript
2
star
61

Indexes.jl

Julia
2
star
62

abstracts

Abstracts for conference talks, posters, and papers
1
star
63

BSG.jl

A wrapper for the BSG library and suite of tools
1
star
64

juju

A version manager for Julia
1
star
65

BioJulia-stickers

Stickers and logos for BioJulia packages
1
star
66

GraphicalFragmentAssembly.jl

Parser for the GFA format
Julia
1
star
67

Community-Issues

Repo to track BioJulia organisation level issues.
1
star