Skip to content
High-level bzip2 bindings for Perl 6
Perl 6
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

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 =;
loop {

my $dcompressor =;
while !$dcompressor.finished {
      my $data-chunk = $dcompressor.decompress($$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.
You can’t perform that action at this time.