Compress-BGZF

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

{
   "abstract" : "Read/write blocked GZIP (BGZF) files",
   "author" : [
      "Jeremy Volkening <volkening@cpan.org>"
   ],
   "dynamic_config" : 1,
   "generated_by" : "Module::Build version 0.4234",
   "license" : [
      "gpl_3"
   ],
   "meta-spec" : {
      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",

META.yml  view on Meta::CPAN

---
abstract: 'Read/write blocked GZIP (BGZF) files'
author:
  - 'Jeremy Volkening <volkening@cpan.org>'
build_requires:
  Test::Fatal: '0'
  Test::More: '0'
configure_requires:
  Config: '0'
  Module::Build: '0'
dynamic_config: 1
generated_by: 'Module::Build version 0.4234, CPAN::Meta::Converter version 2.150010'

README.md  view on Meta::CPAN

Compress::BGZF
====

[![Tests](https://github.com/jvolkening/p5-Compress-BGZF/actions/workflows/tests.yml/badge.svg)](https://github.com/jvolkening/p5-Compress-BGZF/actions/workflows/tests.yml)
[![Coverage Status](https://coveralls.io/repos/github/jvolkening/p5-Compress-BGZF/badge.svg?branch=master)](https://coveralls.io/github/jvolkening/p5-Compress-BGZF?branch=master)
[![CPAN version](https://badge.fury.io/pl/Compress-BGZF.svg)](https://badge.fury.io/pl/Compress-BGZF)


A pure-Perl implementation of blocked gzip (BGZF)

INSTALLATION
------------

To install this module type the following:

    perl Makefile.PL
    make
    make test
    make install

lib/Compress/BGZF.pm  view on Meta::CPAN

use 5.012;
use strict;
use warnings;

1;

__END__

=head1 NAME

Compress::BGZF - Read/write blocked GZIP (BGZF) files

=head1 SYNOPSIS

    use Compress::BGZF::Writer;
    use Compress::BGZF::Reader;

    # create a BGZF file

    my @records = generate_data();
    

lib/Compress/BGZF/Reader.pm  view on Meta::CPAN


}

1;


__END__

=head1 NAME

Compress::BGZF::Reader - Performs blocked GZIP (BGZF) decompression

=head1 SYNOPSIS

    use Compress::BGZF::Reader;

    # Use as filehandle
    my $fh_bgz = Compress::BGZF::Reader->new_filehandle( $bgz_filename );

    # you can do this, but it's probably faster just to pipe gunzip
    while (my $line = <$fh_bgz>) {

lib/Compress/BGZF/Writer.pm  view on Meta::CPAN


}

1;


__END__

=head1 NAME

Compress::BGZF::Writer - Performs blocked GZIP (BGZF) compression

=head1 SYNOPSIS

    use Compress::BGZF::Writer;

    # Use as filehandle
    my $fh_bgz = Compress::BGZF::Writer->new_filehandle( $bgz_filename );
    print ref($writer), "\n"; # prints 'GLOB'
    while ( my $chunk = generate_data() ) {
        print {$fh_bgz} $chunk;

lib/Compress/BGZF/Writer.pm  view on Meta::CPAN

    print ref($writer), "\n"; # prints 'Compress::BGZF::Writer'
    while ( my ($id,$content) = generate_record() ) {
        my $virt_offset = $writer->add_data( $content );
        my $content_len = length $content;
        print {$idx_file} "$id\t$virt_offset\t$content_len\n";
    }
    $writer->finalize(); # flush remaining buffer;

=head1 DESCRIPTION

C<Compress::BGZF::Writer> is a module for writing blocked GZIP (BGZF) files from
any input. There are two main modes of construction - as an object (using
C<new()>) and as a filehandle glob (using C<new_filehandle>). The filehandle
mode is straightforward for general use. The object mode is useful for
tracking the virtual offsets of data chunks as they are added (for instance,
for generation of a custom index).

=head1 METHODS

=head2 Filehandle Functions



( run in 0.769 second using v1.01-cache-2.11-cpan-49f99fa48dc )