Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    File::Format::RIFF 1.0.1

    Download button

    No screenshots available
    Downloads: 638  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Paul Sturm | More programs
    Perl Artistic License / FREE
    April 27th, 2007, 22:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    File::Format::RIFF description

    File::Format::RIFF is a Perl module to Resource Interchange File Format/RIFF files.

    File::Format::RIFF is a Perl module to Resource Interchange File Format/RIFF files.

    SYNOPSIS

    use File::Format::RIFF;

    open( IN, 'file' ) or die "Could not open file: $!";
    my ( $riff1 ) = File::Format::RIFF->read( *IN );
    close( IN );
    $riff1->dump;

    my ( $riff2 ) = new File::Format::RIFF( 'TYPE' );
    foreach my $chunk ( $riff1->data )
    {
    next if ( $chunk->id eq 'LIST' );
    $riff2->addChunk( $chunk->id, $chunk->data );
    }
    open( OUT, ">otherfile" ) or die "Could not open file: $!";
    $riff2->write( *OUT );
    close( OUT );

    File::Format::RIFF provides an implementation of the Resource Interchange File Format. You can read, manipulate, and write RIFF files.

    CONSTRUCTORS

    $riff = new File::Format::RIFF( $type, $data );

    Creates a new File::Format::RIFF object. $type is a four character code that identifies the type of this particular RIFF file. Certain types are defined to have a format, specifying which chunks must appear (e.g., WAVE files). If $type is not specified, it defaults to ' ' (four spaces). $data must be an array reference containing some number of RIFF lists and/or RIFF chunks. If $data is undef or not specified, then the new RIFF object is initialized empty.

    $riff = File::Format::RIFF->read( $fh, $filesize );

    Reads and parses an existing RIFF file from the given filehandle $fh. An exception will be thrown if the file is not a valid RIFF file. $filesize controls one aspect of the file format checking -- if $filesize is not specified, then stat will be called on $fh to determine how much data to expect. You may explicitly specify how much data to expect by passing in that value as $filesize. In either case, the amount of data read will be checked to make sure it matches the amount expected. Otherwise, it will throw an exception. If you do not wish it to make this check, pass in undef for $filesize.

    Please note, if you wish to read an "in memory" filehandle, such as by doing this: open( $fh, '

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Resource Interchange | File Format | Perl module | File::Format::RIFF | Resource | Interchange

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM