High-level bzip2 bindings for perl6
Switch branches/tags
Nothing to show
Clone or download
Latest commit 6b42407 Mar 17, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/Compress Improve heuristic to guess buffer size Mar 17, 2018
t Support of stream class. Jan 19, 2016
.travis.yml Use zef instead of panda May 17, 2017
LICENSE Init Jan 12, 2016
META6.json Bump version Mar 17, 2018
README.md Support of stream class. Jan 19, 2016


perl6-Compress-Bzip2 Build Status

Bindings to bzip2 library. Procedural API is as easy as pie: you can compress and decompress your files like this:


If you want to make a simple "from Buf to Buf" (de)compressing, you should use something like this:

my buf8 $result = compressToBlob($data); # Data should be encoded.
# or
my Str $result = decompressToBlob($compressed-data).decode;

Also, now we support streaming:

my $compressor = Compress::Bzip2::Stream.new;
loop {

my $dcompressor = Compress::Bzip2::Stream.new;
while !$dcompressor.finished {
      my $data-chunk = $dcompressor.decompress($socked.read($size));

Your any suggestions, reporting of issues and advices about design of library will be really helpful.

I'm very grateful to authors of perl6 bindings to zlib compression library, since I took their code as example for this work and wrote very similar interface.


  • Docs.