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  -  FILE::FORMAT::RIFF::CHUNK (3)

.ds Aq ’

NAME

File::Format::RIFF::Chunk - a single RIFF chunk

CONTENTS

SYNOPSIS



   use File::Format::RIFF;

   my ( $chunk ) = new File::Format::RIFF::Chunk;
   $chunk->id( stuf );
   $chunk->data( here is some stuff );

   ... some $container ...

   $container->push( $chunk );



DESCRIPTION

A File::Format::RIFF::Chunk is a single chunk of data in a RIFF file. It has an identifier and one piece of scalar data. The id must be a four character code, and the data can be any piece of scalar data you wish to store, in any format (it is treated as opaque binary data, so you must interpret it yourself).

CONSTRUCTOR

$chunk = new File::Format::RIFF::Chunk( $id, $data ); Creates a new File::Format::RIFF::Chunk object. $id is a four character code that identifies the type of data. If $id is not specified, it defaults to (four spaces). $data is a scalar, treated as opaque binary data. If $data is undef or not specified, it defaults to ’’.

METHODS

$id = $chunk->id; Returns the id of $chunk.
$chunk->id( ’abcd’ ); Sets the id of $chunk. $id must be a four character code that identifies the type of data.
$data = $chunk->data; Returns the data of $chunk.
$chunk->data( $data ); Sets the data of $chunk. $data is treated as a piece of opaque binary data, not modified or interpreted in any way.
$size = $chunk->size; Returns the size (in bytes) of $chunk’s data.
$total_size = $chunk->total_size; Returns the total size (in bytes) that $chunk will take up when written out to a file. Total size is the size of the data, plus 8 bytes for the header, plus 1 alignment byte if the data has an odd number of bytes (so that the RIFF chunks will be word-aligned on disk).
$chunk->dump( $max ); Prints a string representation of $chunk to STDOUT. If the data is larger than $max bytes, prints ’[...]’ instead of the actual data. If $max is not specified or undef, it defaults to 64.

A RIFF chunk is rendered as:

id: <id> size: <size> (<total size>): <data>

AUTHOR

Paul Sturm <sturm@branewave.com>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 FILE::FORMAT::RIFF::CHUNK (3) 2005-08-08

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