-
-
16 Aug 2014 03:37:57 UTC
- Distribution: Data-BitStream
- Module version: 0.08
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Issues (0)
- Testers (675 / 0 / 0)
- Kwalitee
Bus factor: 1- 78.88% Coverage
- License: perl_5
- Perl: v5.6.2
- Activity
24 month- Tools
- Download (108.2KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Carp
- Class::XSAccessor
- Exporter
- Moo
- Moo::Role
- MooX::Types::MooseLike
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Data::BitStream::String - A String implementation of Data::BitStream
SYNOPSIS
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);
DESCRIPTION
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.
DATA
CLASS METHODS
- _strref
-
Retrieves a reference to the private string.
- after erase
-
Sets the private string to the empty string
''
. - read
- write
- put_unary
- get_unary
- put_unary1
- get_unary1
- put_gamma
- get_gamma
- put_string
- read_string
- to_string
- from_string
- to_raw
- put_raw
-
These methods have custom implementations.
ROLES
The following roles are included. Note that Gamma has an inline implementation.
- Data::BitStream::Code::Base
- Data::BitStream::Code::Delta
- Data::BitStream::Code::Omega
- Data::BitStream::Code::Levenstein
- Data::BitStream::Code::EvenRodeh
- Data::BitStream::Code::Fibonacci
- Data::BitStream::Code::Golomb
- Data::BitStream::Code::Rice
- Data::BitStream::Code::GammaGolomb
- Data::BitStream::Code::ExponentialGolomb
- Data::BitStream::Code::StartStop
- Data::BitStream::Code::Baer
- Data::BitStream::Code::BoldiVigna
- Data::BitStream::Code::ARice
- Data::BitStream::Code::Additive
- Data::BitStream::Code::Comma
- Data::BitStream::Code::Taboo
SEE ALSO
AUTHORS
Dana Jacobsen <dana@acm.org>
COPYRIGHT
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.
Module Install Instructions
To install Data::BitStream, copy and paste the appropriate command in to your terminal.
cpanm Data::BitStream
perl -MCPAN -e shell install Data::BitStream
For more information on module installation, please visit the detailed CPAN module installation guide.