Data::BitStream::Code::Gamma - A Role implementing Elias Gamma codes
version 0.01
A role written for Data::BitStream that provides get and set methods for the Elias Gamma codes. The role applies to a stream object.
This is a very common and very useful code, and is used to create some other codes (e.g. Elias Delta, Gamma-Golomb, and Exponential-Golomb).
Insert one or more values as Gamma codes. Returns 1.
Decode one or more Gamma codes from the stream. If count is omitted, one value will be read. If count is negative, values will be read until the end of the stream is reached. In scalar context it returns the last code read; in array context it returns an array of all codes read.
These methods are required for the role.
Dana Jacobsen <dana@acm.org>
Copyright 2011 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.