NAME

Data::MPQ::Archive - Perl module to work with MPQ archive block

SYNOPSIS

use Data::MPQ;

my $mpq = Data::MPQ->new(filename => 'my_game.sc2replay');
$mpq->parse;

my $archive = $mpq->archive;

print for $archive->list_file;

DESCRIPTION

This module parse and give you an access to MPQ archive block - heart of the MPQ file

METHODS

new

Constructor for the Data::MPQ::Shunt class. Requires two parameters:

file   - Filehandle of the MPQ archive
offset - Offset of the beginning of the shunt block

parse

Method to parse archive block of the MPQ file which consist of 3 data blocks:

header - Data::MPQ::Archive::Header
hash table - Data::MPQ::Archive::HashTable
data table - Data::MPQ::Archive::BlockTable

list_file

Returns an array of the files inside of the archive

file

Takes filename as a parameter.

Returns an instance of the Data::MPQ::Archive::File for the given filename or undef if the file could not be find.

Accessor for the instance of the Data::MPQ::Archive::Header which represent the archive header data block

hash_table

Accessor for the instance of the Data::MPQ::Archive::HashTable which represent the archive hash table data block

block_table

Accessor for the instance of the Data::MPQ::Archive::BlockTable which represent the archive block table data block

AUTHOR

cono q@cono.org.ua

C corporation (c)