The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
Data-BitStream version 0.07
===========================

A Moo class providing read/write access to bit streams.  This includes many
integer coding methods as well as straightforward ways to implement new codes.

Bit streams are often used in data compression and in embedded products where
memory is at a premium.  While this Perl implementation may not be appropriate
for many of these applications (speed and Perl), it can be very useful for
prototyping and experimenting with different codes.

The Data::BitStream::XS module is also available, and is a near drop-in
replacement for this module, though it does not use Moose.  The Data::BitStream
module will internally use the XS module if it is found, giving a lot of the
performance benefit without any other changes necessary.


SYNOPSIS

  use Data::BitStream;
  my $stream = Data::BitStream->new;
  $stream->put_gamma($_) for (1 .. 20);
  $stream->rewind_for_read;
  my @values = $stream->get_gamma(-1);

See the POD module documentation for examples and more information on all the
methods included.  There are also examples and benchmarks in the examples
directory in the distribution, including a functional lossless image codec.


INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install


DEPENDENCIES

This module requires these other modules and libraries:

  Test::More
  Moo
  Moo::Role
  MooX::Types::MooseLike

It works identically with Moo, Mouse, or Moose.  Moo with Class::XSAccessor
installed is as fast as Mouse for some operations, but not all.  If speed
is important, install Data::BitStream::XS.  If speed is more important than
extensibility, use Data::BitStream::XS directly.

I have tested this using perl versions 5.6.2, 5.8.0, 5.8.9, 5.10.1, 5.12.4,
5.14.1, 5.15.2, 5.16.0, 5.16.2, and 5.17.5.

It works with Perl 5.6.2, with a caveat.  On 32-bit O/S, 64-bit Perl can have
broken arithmetic (two unequal 64-bit numbers will compare as equal).  We force
maxbits to 32 if it looks like it won't work with 64.


COPYRIGHT AND LICENCE

Copyright (C) 2011-2013 by Dana Jacobsen <dana@acm.org>

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.14.1 or,
at your option, any later version of Perl 5 you may have available.