GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  EBOOK::TOOLS::LZSS (3)

.ds Aq ’

NAME

EBook::Tools::LZSS - Lempel-Ziv-Storer-Szymanski compression and decompression

CONTENTS

SYNOPSIS



 use EBook::Tools::LZSS;
 my $lzss = EBook::Tools::LZSS->new(lengthbits => 3,
                                    offsetbits => 14,
                                    windowinit => the man);
 my $textref = $lzss->uncompress(\$data);



CONSTRUCTOR AND INITIALIZATION

CWnew(%args)

Instantiates a new EBook::Tools::LZSS object.

Arguments

All arguments are optional, but must be identical between compression and decompression for the result to be valid.
o lengthbits

The number of bits used to encode the length of a LZSS reference. If not specified defaults to 4 bits.

The eBookwise .IMP format typically compresses with 3 length bits.

Note that the actual length of the LZSS reference in bytes is greater than the value stored in the length bits. The actual number of bytes returned is the decoded length bits value plus maxuncoded plus 1,

o offsetbits

The number of bits used to encode the offset to a LZSS reference. This also determines the size of the sliding window of reference data. If not specified, it defaults to 12 bits (4096-byte window).

The eBookwise .IMP format typically compresses with 14 offset bits (16384-byte window).

o windowinit

A string used to initalize the sliding window. If specified, this string MUST be the same length as the window size, or the subroutine will croak. If not specified, the window will be initialized with spaces.

o windowstart

The first byte position in the window that will be overwritten by decoded text. If not specified, defaults to 0.

o maxuncoded

The maximum number of uncoded bytes (?). This currently isn’t used for that purpose, but determines the actual length of a LZSS reference.

o screwybits

If set to true and the number of offset bits is greater than 8, then the offset bits will be read first in a chunk of 8 for the least significant bits, and then the remaining bits will be read and use as the most significant bits. This seems to be necessary for compatibility with Michael Dipperstein’s LZSS C compression library but does not hold true for IMP e-book LZSS decompression.

o verbose

If set to true, compression and uncompression will provide additional status feedback on STDOUT.

METHODS

CWuncompress(\$dataref)

Takes a reference to a compressed data string, uncompresses the data string and returns a reference to the uncompressed string.

BUGS AND LIMITATIONS

o Compression not yet implemented.
o The LZSS algorithm isn’t documented in the POD.
o Once compression is implemented and the algorithm is documented, this module is a good candidate for being forked off into its own project. Relying on it to keep its current name may be unwise.

AUTHOR

Zed Pobre <zed@debian.org>

The design of this module was based on the C LZSS library by Michael Dipperstein, version 0.5.2, at http://michael.dipperstein.com/lzss/

LICENSE AND COPYRIGHT

Copyright 2008 Zed Pobre

Licensed to the public under the terms of the GNU GPL, version 2.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 EBOOK::TOOLS::LZSS (3) 2016-04-05

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.