Data::BitStream::String - A String implementation of Data::BitStream
use Data::BitStream::String; my $stream = Data::BitStream::String->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 is very memory inefficient, as it uses a binary string to hold the data, hence uses one byte internally per bit of data. However it is a useful reference implementation, and since most operations use Perl operations it is quite fast.
A private string holding the data in binary string form.
Retrieves a reference to the private string.
Sets the private string to the empty string
These methods have custom implementations.
The following roles are included. Note that Gamma has an inline implementation.
Dana Jacobsen <email@example.com>
Copyright 2011-2012 by Dana Jacobsen <firstname.lastname@example.org>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.