File-Raw-Gzip

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for File-Raw-Gzip

0.03    2026-05-17
        - Fix Strawberry / Win32 "Free to wrong pool" crash
        - Bumped File::Raw prereq to 0.13 for the streaming O_BINARY
          fix on Windows 

0.02    2026-05-07
        - Bumped File::Raw prereq to 0.12

0.01    2026-05-05
        First version, released on an unsuspecting world.

gz.c  view on Meta::CPAN

/*
 * gz.c - zlib inflate/deflate wrappers driving a malloc-grown output
 * buffer. Both functions consume the entire input in one go (one-shot
 * codec, no streaming). Output buffer doubles when full; that bounds
 * realloc count to log2(out_size).
 */

#include "gz.h"

#include <stdlib.h>
#include <string.h>
#include <zlib.h>

#define GZ_DEFAULT_CHUNK   (128 * 1024)

lib/File/Raw/Gzip.pm  view on Meta::CPAN

File::Raw's plugin chain. Put C<'gzip'> first in a READ and WRITE chains

    # READ:  bytes -> inflate -> csv parse
    my $rows = file_slurp("data.csv.gz",
                          plugin => ['gzip', 'csv']);

    # WRITE: csv encode -> deflate -> bytes
    file_spew("out.csv.gz", $rows,
              plugin => ['gzip', 'csv']);

C<each_line> (the streaming path) is single-plugin only; chain
composition belongs to the slurp/spew/append/atomic_spew calls.

=head1 INSTALLATION REQUIREMENTS

C<File::Raw::Gzip> links against the system C<libz>. The development
package must be installed before C<perl Makefile.PL>:

=over 4

=item Debian / Ubuntu

lib/File/Raw/Gzip.pm  view on Meta::CPAN


Already bundled; no extra install needed.

=back

=head1 SEE ALSO

L<File::Raw> - the underlying fast file IO layer.

L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip> - the in-memory and
streaming codecs we link against in tests for wire-compatibility.

L<Compress::Raw::Zlib> - the lower-level zlib binding;

=head1 AUTHOR

LNATION <email@lnation.org>

=head1 LICENSE AND COPYRIGHT

This software is Copyright (c) 2026 by LNATION <email@lnation.org>.



( run in 1.735 second using v1.01-cache-2.11-cpan-140bd7fdf52 )