Data::BitStream::Vec - A Vector-1 implementation of Data::BitStream
use Data::BitStream::Vec; my $stream = Data::BitStream::Vec->new; $stream->put_gamma($_) for (1 .. 20); $stream->rewind_for_read; my @values = $stream->get_gamma(-1);
An implementation of Data::BitStream. See the documentation for that module for many more examples, and Data::BitStream::Base for the API. This document only describes the unique features of this implementation, which is of limited value to people purely using Data::BitStream.
This implementation uses a Perl vec to store the data. The vector is accessed in 1-bit units, which makes it easy and portable, however it is slow. It really is deprecated in favor of Data::BitStream::WordVec.
vec
A private scalar holding the data as a vector.
Retrieves a reference to the private vector.
Sets the private vector to the empty string ''.
''
These methods have custom implementations.
The following roles are included.
Dana Jacobsen <dana@acm.org>
Copyright 2011-2012 by Dana Jacobsen <dana@acm.org>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Data::BitStream, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::BitStream
CPAN shell
perl -MCPAN -e shell install Data::BitStream
For more information on module installation, please visit the detailed CPAN module installation guide.