
ESPPlus::Storage::Record - A single ESP+ Storage record

use ESPPlus::Storage;
my $st = ESPPlus::Storage->new
( { filename => $Repository,
uncompress_function => \&uncompress } );
my $rd = $st->reader;
while ( my $record = $rd->next_record ) {
print $record->record_number, "\t",
$record->expected_length, "\n";
}

ESPPlus::Storage::Record is an interface to individual ESP+ Storage repository records. Mostly it exists to make the job of uncompressing the internal .Z file easy, the other methods extract information from the record's header.

my $rc = ESPPlus::Storage::Record->new
( { header_text => \ $header_text,
compressed => \ $record_body,
uncompress_function => \ &uncompress,
record_number => $rec_num } );
This accepts the header_text, record_number and either a compressed and uncompress_function parameter OR an uncompressed parameter.

This returns the uncompressed content of the record. If the record has already been uncompressed then it caches the inflated form.
This returns the compressed record (if it is stored).
This returns the stored uncomressed record. This is not populated automatically and you should probably use the body method instead.
This returns the original record headers.
This is the length of the headers.
This returns the expected length of the uncompressed record. It is used as a check to see whether the uncompression was successful or not.
The record timestamp.
The ESP+ Storage repository name.

Copyright 2003, Joshua b. Jore. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of either:
a) the GNU General Public License as published by the Free Software Foundation; version 2, or
b) the "Artistic License" which comes with Perl.
