GitXplorerGitXplorer
r

P6-Compress-Zlib-Raw

public
3 stars
8 forks
3 issues

Commits

List of commits on branch master.
Unverified
0b836689479c497484c5c9794647660a526dd15e

fix travis

rretupmoca committed 7 years ago
Unverified
ee3305008ad7cb19d15c59ce36e29b733b8b1466

Merge pull request #16 from zoffixznet/patch-1

rretupmoca committed 8 years ago
Unverified
072ab28ffe19b3c8e53883401ae21e1eebba12c2

Use modern META filename

zzoffixznet committed 8 years ago
Unverified
164231840b5f69b5fb5f19024f69303ebae7a5b4

Merge pull request #15 from jonathanstowe/master

rretupmoca committed 8 years ago
Unverified
b05bb2f55fbcb3f318ebd4591058d89d0d7a0a51

Up the version

jjonathanstowe committed 8 years ago
Unverified
d75fb270736fb6c3a8d6f3416c02ca38d0c334fa

For some inexplicable reason the 'return' here gives rise to a

jjonathanstowe committed 8 years ago

README

The README file for this repository.

Compress::Zlib::Raw

Build Status Build status

Low-level interface to zlib.

Note: This will probably only work on 64bit *nix, due to hardcoded library name and sizeof numbers.

##Example

use v6;

use Compress::Zlib::Raw;
use NativeCall;

my $to-compress = "test".encode;

my $return-buf-len = CArray[long].new;
$return-buf-len[0] = 128;

my $return-buf = buf8.new;
$return-buf[127] = 0;

my $result = compress($return-buf, $return-buf-len, $to-compress, 4);
die if $result != Compress::Zlib::Raw::Z_OK;

my $orig-buf = buf8.new;
$orig-buf[127] = 1;

my $orig-size = CArray[long].new;
$orig-size[0] = 128;

$result = uncompress($orig-buf, $orig-size, $return-buf, $return-buf-len[0]);
die if  $result != Compress::Zlib::Raw::Z_OK;

Author

Andrew Egeler, retupmoca on #perl6, https://github.com/retupmoca/

License

MIT License