Dana Jacobsen > Data-BitStream-0.07 > Data::BitStream::WordVec

Download:
Data-BitStream-0.07.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.03   Source   Latest Release: Data-BitStream-0.08

NAME ^

Data::BitStream::WordVec - A Vector-32 implementation of Data::BitStream

SYNOPSIS ^

  use Data::BitStream::WordVec;
  my $stream = Data::BitStream::WordVec->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 uses a Perl vec to store the data. The vector is accessed in 32-bit units, which makes it safe for 32-bit and 64-bit machines as well as reasonably time efficient.

This is the default Data::BitStream implementation.

DATA

_vec

A private scalar holding the data as a vector.

CLASS METHODS

_vecref

Retrieves a reference to the private vector.

after erase

Sets the private vector to the empty string ''.

read
write
put_unary
get_unary
put_gamma
put_string
to_string
from_string
from_raw
to_raw

These methods have custom implementations.

ROLES

The following roles are included.

Data::BitStream::Code::Base
Data::BitStream::Code::Gamma
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 ^

Data::BitStream
Data::BitStream::Base
Data::BitStream::String

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.

syntax highlighting: