swf file format
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 3525
File::Format::RIFF 1.0.1
File::Format::RIFF is a Perl module to Resource Interchange File Format/RIFF files. more>>
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, read( $fh, $filesize );
The read constructor may also be used as a method. If used in this manner, then all existing data contained in $riff will be discarded, and replaced by the contents read from $fh.
$riff->write( $fh );
Outputs a properly-formatted RIFF file to the given filehandle $fh.
<<lessSYNOPSIS
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, read( $fh, $filesize );
The read constructor may also be used as a method. If used in this manner, then all existing data contained in $riff will be discarded, and replaced by the contents read from $fh.
$riff->write( $fh );
Outputs a properly-formatted RIFF file to the given filehandle $fh.
Download (0.009MB)
Added: 2007-04-27 License: Perl Artistic License Price:
916 downloads
WebSwf Slide Show Creator 1.0
WebSwf is a program for generating slide shows in Macromedia SWF Flash format. more>>
WebSwf is a program for generating slide shows in Macromedia SWF Flash format. WebSwf Slide Show Creator is a multi-user application with a client-server architecture. SWF generation is done with PHPs Ming extensions.
Main features:
- Multi user, every user can keep different projects, a project is a container for one or more slideshows.
- Simple and cross fading are supported.
- Client-server, all data are stored in the server database and folders.
- Modern browsers are supported, for example Firefox.
- Built upon well known open-source technologie such as PHP, MySQL and Ming SWF libraries, can be easily customized.
- Slideshows can be tailored to be used on an handheld device.
<<lessMain features:
- Multi user, every user can keep different projects, a project is a container for one or more slideshows.
- Simple and cross fading are supported.
- Client-server, all data are stored in the server database and folders.
- Modern browsers are supported, for example Firefox.
- Built upon well known open-source technologie such as PHP, MySQL and Ming SWF libraries, can be easily customized.
- Slideshows can be tailored to be used on an handheld device.
Download (MB)
Added: 2006-02-22 License: GPL (GNU General Public License) Price:
1362 downloads
Time::Format 1.02
Time::Format is a Perl module for easy-to-use date/time formatting. more>>
Time::Format is a Perl module for easy-to-use date/time formatting.
SYNOPSIS
use Time::Format qw(%time %strftime %manip);
$time{$format}
$time{$format, $unixtime}
print "Today is $time{yyyy/mm/dd}n";
print "Yesterday was $time{yyyy/mm/dd, time-24*60*60}n";
print "The time is $time{hh:mm:ss}n";
print "Another time is $time{H:mm am tz, $another_time}n";
print "Timestamp: $time{yyyymmdd.hhmmss.mmm}n";
%time also accepts Date::Manip strings and DateTime objects:
$dm = Date::Manip::ParseDate(last monday);
print "Last monday was $time{Month d, yyyy, $dm}";
$dt = DateTime->new (....);
print "Heres another date: $time{m/d/yy, $dt}";
It also accepts most ISO-8601 date/time strings:
$t = 2005/10/31T17:11:09; # date separator: / or - or .
$t = 2005-10-31 17.11.09; # in-between separator: T or _ or space
$t = 20051031_171109; # time separator: : or .
$t = 20051031171109; # separators may be omitted
$t = 2005/10/31; # date-only is okay
$t = 17:11:09; # time-only is okay
# But not:
$t = 20051031; # date-only without separators
$t = 171109; # time-only without separators
# ...because those look like epoch time numbers.
%strftime works like POSIXs strftime, if you like those %-formats.
$strftime{$format}
$strftime{$format, $unixtime}
$strftime{$format, $sec,$min,$hour, $mday,$mon,$year, $wday,$yday,$isdst}
print "POSIXish: $strftime{%A, %B %d, %Y, 0,0,0,12,11,95,2}n";
print "POSIXish: $strftime{%A, %B %d, %Y, 1054866251}n";
print "POSIXish: $strftime{%A, %B %d, %Y}n"; # current time
%manip works like Date::Manips UnixDate function.
$manip{$format};
$manip{$format, $when};
print "Date::Manip: $manip{%m/%d/%Y}n"; # current time
print "Date::Manip: $manip{%m/%d/%Y,last Tuesday}n";
These can also be used as standalone functions:
use Time::Format qw(time_format time_strftime time_manip);
print "Today is ", time_format(yyyy/mm/dd, $some_time), "n";
print "POSIXish: ", time_strftime(%A %B %d, %Y,$some_time), "n";
print "Date::Manip: ", time_manip(%m/%d/%Y,$some_time), "n";
This module creates global pseudovariables which format dates and times, according to formatting codes you pass to them in strings.
The %time formatting codes are designed to be easy to remember and use, and to take up just as many characters as the output time value whenever possible. For example, the four-digit year code is "yyyy", the three-letter month abbreviation is "Mon".
The nice thing about having a variable-like interface instead of function calls is that the values can be used inside of strings (as well as outside of strings in ordinary expressions). Dates are frequently used within strings (log messages, output, data records, etc.), so having the ability to interpolate them directly is handy.
Perl allows arbitrary expressions within curly braces of a hash, even when that hash is being interpolated into a string. This allows you to do computations on the fly while formatting times and inserting them into strings. See the "yesterday" example above.
The format strings are designed with programmers in mind. What do you need most frequently? 4-digit year, month, day, 24-based hour, minute, second -- usually with leading zeroes. These six are the easiest formats to use and remember in Time::Format: yyyy, mm, dd, hh, mm, ss. Variants on these formats follow a simple and consistent formula. This module is for everyone who is weary of trying to remember strftime(3)s arcane codes, or of endlessly writing $t[4]++; $t[5]+=1900 as you manually format times or dates.
Note that mm (and related codes) are used both for months and minutes. This is a feature. %time resolves the ambiguity by examining other nearby formatting codes. If its in the context of a year or a day, "month" is assumed. If in the context of an hour or a second, "minute" is assumed.
The format strings are not meant to encompass every date/time need ever conceived. But how often do you need the day of the year (strftimes %j) or the week number (strftimes %W)?
For capabilities that %time does not provide, %strftime provides an interface to POSIXs strftime, and %manip provides an interface to the Date::Manip modules UnixDate function.
If the companion module Time::Format_XS is also installed, Time::Format will detect and use it. This will result in a significant speed increase for %time and time_format.
<<lessSYNOPSIS
use Time::Format qw(%time %strftime %manip);
$time{$format}
$time{$format, $unixtime}
print "Today is $time{yyyy/mm/dd}n";
print "Yesterday was $time{yyyy/mm/dd, time-24*60*60}n";
print "The time is $time{hh:mm:ss}n";
print "Another time is $time{H:mm am tz, $another_time}n";
print "Timestamp: $time{yyyymmdd.hhmmss.mmm}n";
%time also accepts Date::Manip strings and DateTime objects:
$dm = Date::Manip::ParseDate(last monday);
print "Last monday was $time{Month d, yyyy, $dm}";
$dt = DateTime->new (....);
print "Heres another date: $time{m/d/yy, $dt}";
It also accepts most ISO-8601 date/time strings:
$t = 2005/10/31T17:11:09; # date separator: / or - or .
$t = 2005-10-31 17.11.09; # in-between separator: T or _ or space
$t = 20051031_171109; # time separator: : or .
$t = 20051031171109; # separators may be omitted
$t = 2005/10/31; # date-only is okay
$t = 17:11:09; # time-only is okay
# But not:
$t = 20051031; # date-only without separators
$t = 171109; # time-only without separators
# ...because those look like epoch time numbers.
%strftime works like POSIXs strftime, if you like those %-formats.
$strftime{$format}
$strftime{$format, $unixtime}
$strftime{$format, $sec,$min,$hour, $mday,$mon,$year, $wday,$yday,$isdst}
print "POSIXish: $strftime{%A, %B %d, %Y, 0,0,0,12,11,95,2}n";
print "POSIXish: $strftime{%A, %B %d, %Y, 1054866251}n";
print "POSIXish: $strftime{%A, %B %d, %Y}n"; # current time
%manip works like Date::Manips UnixDate function.
$manip{$format};
$manip{$format, $when};
print "Date::Manip: $manip{%m/%d/%Y}n"; # current time
print "Date::Manip: $manip{%m/%d/%Y,last Tuesday}n";
These can also be used as standalone functions:
use Time::Format qw(time_format time_strftime time_manip);
print "Today is ", time_format(yyyy/mm/dd, $some_time), "n";
print "POSIXish: ", time_strftime(%A %B %d, %Y,$some_time), "n";
print "Date::Manip: ", time_manip(%m/%d/%Y,$some_time), "n";
This module creates global pseudovariables which format dates and times, according to formatting codes you pass to them in strings.
The %time formatting codes are designed to be easy to remember and use, and to take up just as many characters as the output time value whenever possible. For example, the four-digit year code is "yyyy", the three-letter month abbreviation is "Mon".
The nice thing about having a variable-like interface instead of function calls is that the values can be used inside of strings (as well as outside of strings in ordinary expressions). Dates are frequently used within strings (log messages, output, data records, etc.), so having the ability to interpolate them directly is handy.
Perl allows arbitrary expressions within curly braces of a hash, even when that hash is being interpolated into a string. This allows you to do computations on the fly while formatting times and inserting them into strings. See the "yesterday" example above.
The format strings are designed with programmers in mind. What do you need most frequently? 4-digit year, month, day, 24-based hour, minute, second -- usually with leading zeroes. These six are the easiest formats to use and remember in Time::Format: yyyy, mm, dd, hh, mm, ss. Variants on these formats follow a simple and consistent formula. This module is for everyone who is weary of trying to remember strftime(3)s arcane codes, or of endlessly writing $t[4]++; $t[5]+=1900 as you manually format times or dates.
Note that mm (and related codes) are used both for months and minutes. This is a feature. %time resolves the ambiguity by examining other nearby formatting codes. If its in the context of a year or a day, "month" is assumed. If in the context of an hour or a second, "minute" is assumed.
The format strings are not meant to encompass every date/time need ever conceived. But how often do you need the day of the year (strftimes %j) or the week number (strftimes %W)?
For capabilities that %time does not provide, %strftime provides an interface to POSIXs strftime, and %manip provides an interface to the Date::Manip modules UnixDate function.
If the companion module Time::Format_XS is also installed, Time::Format will detect and use it. This will result in a significant speed increase for %time and time_format.
Download (0.038MB)
Added: 2007-07-19 License: Perl Artistic License Price:
830 downloads
Tie::Formatted 0.02
Tie::Formatted is a Perl module embed sprintf() formatting in regular print(). more>>
Tie::Formatted is a Perl module embed sprintf() formatting in regular print().
SYNOPSIS
use Tie::Formatted;
print "The value is $format{$number, "%3d"} ",
"(or $format{$number, "%04x"} in hex)n";
print "some numbers: $format{ 12, 492, 1, 8753, "%04d"}n";
This module creates a global read-only hash, %format, for formatting data items with standard sprintf format specifications. Since its a hash, you can interpolate it into strings as well as use it standalone.
The hash should be "accessed" with two or more "keys". The last key is interpreted as a sprintf format for each data item specified in the preceeding arguments. This allows you to format multiple items at once using the same format for each.
Alternate name
If you prefer, you can specify a different name for the magical formatting hash by supplying it as as argument when useing the module:
use Tie::Formatted qw(z);
This makes %z the magic hash instead.
print "This is hex: $z{255, "%04x"}n";
Tie::Formatted currently supports only one format in the final argument; this may change if there is demand for it.
<<lessSYNOPSIS
use Tie::Formatted;
print "The value is $format{$number, "%3d"} ",
"(or $format{$number, "%04x"} in hex)n";
print "some numbers: $format{ 12, 492, 1, 8753, "%04d"}n";
This module creates a global read-only hash, %format, for formatting data items with standard sprintf format specifications. Since its a hash, you can interpolate it into strings as well as use it standalone.
The hash should be "accessed" with two or more "keys". The last key is interpreted as a sprintf format for each data item specified in the preceeding arguments. This allows you to format multiple items at once using the same format for each.
Alternate name
If you prefer, you can specify a different name for the magical formatting hash by supplying it as as argument when useing the module:
use Tie::Formatted qw(z);
This makes %z the magic hash instead.
print "This is hex: $z{255, "%04x"}n";
Tie::Formatted currently supports only one format in the final argument; this may change if there is demand for it.
Download (0.005MB)
Added: 2007-01-15 License: Perl Artistic License Price:
1012 downloads
Flat File Extractor 0.2.2
Flat File Extractor can be used for reading different flat file structures and printing them in different formats. more>>
Flat File Extractor can be used for reading different flat file structures and printing them in different formats. ffe is a command line tool developed in GNU/Linux environment and it is distributed under GNU General Public License 2 or later.
Main areas of use are:
- Extracting particular fields or records from a flat file
- Converting data from one format to an other, e.g. from CSV to fixed length
- Verifying a flat file structure
- Testing tool for flat file development
- Displaying flat file content in human readable form
Main features:
- Command-line tool
- Reads standard input and writes to standard output as default
- One input file can contain several types of records (lines)
- Fields in a flat file can be fixed length or separated
- Input file structure and output definitions are independent, meaning one output format can be used with several input files
- Input file structure and output format are freely configurable, they are not predefined
- Output can be formatted e.g. as: fixed length, separated, tokenized, XML, SQL,...
- ffe tries to guess the input format, user needs not to give it as a parameter
Enhancements:
- Configuration keyword const has been added
<<lessMain areas of use are:
- Extracting particular fields or records from a flat file
- Converting data from one format to an other, e.g. from CSV to fixed length
- Verifying a flat file structure
- Testing tool for flat file development
- Displaying flat file content in human readable form
Main features:
- Command-line tool
- Reads standard input and writes to standard output as default
- One input file can contain several types of records (lines)
- Fields in a flat file can be fixed length or separated
- Input file structure and output definitions are independent, meaning one output format can be used with several input files
- Input file structure and output format are freely configurable, they are not predefined
- Output can be formatted e.g. as: fixed length, separated, tokenized, XML, SQL,...
- ffe tries to guess the input format, user needs not to give it as a parameter
Enhancements:
- Configuration keyword const has been added
Download (0.23MB)
Added: 2007-05-30 License: GPL (GNU General Public License) Price:
882 downloads
SWF::Element 0.42
SWF::Element is a set of classes of SWF tags and elements. more>>
SWF::Element is a set of classes of SWF tags and elements.
SYNOPSIS
use SWF::Element;
use SWF::BinStream;
$swf_stream=SWF::BinStream::Write;
....
$rect=SWF::Element::RECT->new;
$rect->configure(Xmin=>0, Ymin=>0, Xmax=>100, Ymax=>100);
$rect->pack($swf_stream);
....
SWF::Element module handles SWF tags and any other sub elements to create, configure, clone, pack to bit strings, and unpack from bit strings.
SWF::Element::*
SWF::Element class is a base class of SWF element, such as Tag, RECT, SHAPE, etc. Each SWF::Element object has one or more fields.
<<lessSYNOPSIS
use SWF::Element;
use SWF::BinStream;
$swf_stream=SWF::BinStream::Write;
....
$rect=SWF::Element::RECT->new;
$rect->configure(Xmin=>0, Ymin=>0, Xmax=>100, Ymax=>100);
$rect->pack($swf_stream);
....
SWF::Element module handles SWF tags and any other sub elements to create, configure, clone, pack to bit strings, and unpack from bit strings.
SWF::Element::*
SWF::Element class is a base class of SWF element, such as Tag, RECT, SHAPE, etc. Each SWF::Element object has one or more fields.
Download (0.050MB)
Added: 2007-01-04 License: Perl Artistic License Price:
1034 downloads
File::Locate 0.61
File::Locate is a Perl module to search the (s)locate-database from Perl. more>>
File::Locate is a Perl module to search the (s)locate-database from Perl.
SYNOPSIS
use File::Locate;
print join "n", locate "mp3", "/usr/var/locatedb";
# or only test of something is in the database
if (locate("mp3", "/usr/var/locatedb")) {
print "yep...sort of mp3 there";
}
# do regex search
print join "n", locate "^/usr", -rex => 1, "/usr/var/locatedb";
ABSTRACT
Search the (s)locate-database from Perl
File::Locate provides the locate() function that scans the locate database for a given substring or POSIX regular expression. The module can handle both plain old locate databases as well as the more hip slocate format.
<<lessSYNOPSIS
use File::Locate;
print join "n", locate "mp3", "/usr/var/locatedb";
# or only test of something is in the database
if (locate("mp3", "/usr/var/locatedb")) {
print "yep...sort of mp3 there";
}
# do regex search
print join "n", locate "^/usr", -rex => 1, "/usr/var/locatedb";
ABSTRACT
Search the (s)locate-database from Perl
File::Locate provides the locate() function that scans the locate database for a given substring or POSIX regular expression. The module can handle both plain old locate databases as well as the more hip slocate format.
Download (0.020MB)
Added: 2006-11-11 License: Perl Artistic License Price:
1077 downloads
AudioFormat 0.5.1
AudioFormat is a simple, unobtrusive audio format converter for your GNOME desktop. more>>
AudioFormat is a simple, unobtrusive audio format converter for your GNOME desktop. The project integrates with Nautilus and the desktop-wide audio profile settings.
AudioFormat is available under the terms of the BSD License.
<<lessAudioFormat is available under the terms of the BSD License.
Download (0.013MB)
Added: 2007-03-24 License: BSD License Price:
944 downloads
IFF Format Library 0.1
IFF Format Library provides header structures and utility functions for reading and writing data files in the Interchange Files. more>>
IFF Format Library provides header structures and utility functions for reading and writing data files in the Interchange Files.
The Interchange File Format is a simple structured binary file format consisting of sized and typed chunks of data, selectively readable without having to know the format of each chunk.
This functionality is similar to what XML provides for text documents, and the IFF format can indeed be viewed as a sort of a binary XML. IFFs extensibility is an excellent way of not breaking old applications when the file format changes, making it an excellent choice for your next applications data files.
The IFF is also the simplest and the smallest such data format, ensuring that your files consist of real data rather than overhead and that your code spends more time on real work than on parsing the data file. This library defines the IFF header structures and provides simple algorithms for directly writing many of your objects as chunks and containers.
Installation:
This library can be downloaded from SourceForge, as can its sole prerequisite:
libiff - The library source package.
uSTL - An STL implementation, required.
First, unpack and install uSTL, as described in its documentation. Unpack libiff and run ./configure; make install, which will install the library to /usr/local/lib and headers to /usr/local/include. ./configure --help lists available configuration options, in the usual autoconf fashion. The one thing to be aware of is that by default the library will not be completely conforming to EA85 specification. Why that is so, and why you should take the default options anyway, is discussed in detail in the next section. If you really want to use the original EA85 format, you can to pass --with-bigendian --with-2grain to configure.
Usage:
If you are using C++, chances are you already have an object-oriented design of some kind. You have a collection of objects, related to each other in some way, and you want to write them all to a file in some way. It is, of course, possible to just write them all to the file, one after the other, but that approach makes things difficult if you ever decide to change the structure of those objects, write more or fewer of them, or explain to other people how to read your format. Hence, it is desirable to create some kind of structure in the file, to be able to determine where each objects begins and ends, and what kind of object is where. When using an IFF format, youll make simple objects into chunks, and objects containing other objects into FORMs, LISTs, or CATs.
The first task is to make each of your objects readable and writable through uSTL streams. To do that youll need to define three methods, read, write, and stream_size, and create flow operator overrides with a STD_STREAMABLE macro. Here is a typical example:
#include < iff.h > // iff header includes ustl.h, but doesnt use the namespace.
using namespace ustl; // it is recommended to leave iff:: namespace on.
/// Stores players vital statistics.
class CPlayerStats {
public:
void read (istream& is);
void write (ostream& os) const;
size_t stream_size (void) const;
private:
uint16_t m_HP;
uint16_t m_MaxHP;
uint16_t m_Mana;
uint16_t m_MaxMana;
};
// Since the object is simple, and contains no other objects,
// well make it a simple chunk.
enum { // Define a chunk format for writing this object.
fmt_PlayerStats = IFF_FMT(S,T,A,T)
}; // In a hex editor youll see STAT at the beginning of the object
// making it easy to find when you want to hack something in it.
/// Reads the object from stream p is
void CPlayerStats::read (istream& is)
{
is >> m_HP >> m_MaxHP >> m_Mana >> m_MaxMana;
}
/// Writes the object to stream p os.
void CPlayerStats::write (ostream& os) const
{
os<<less
The Interchange File Format is a simple structured binary file format consisting of sized and typed chunks of data, selectively readable without having to know the format of each chunk.
This functionality is similar to what XML provides for text documents, and the IFF format can indeed be viewed as a sort of a binary XML. IFFs extensibility is an excellent way of not breaking old applications when the file format changes, making it an excellent choice for your next applications data files.
The IFF is also the simplest and the smallest such data format, ensuring that your files consist of real data rather than overhead and that your code spends more time on real work than on parsing the data file. This library defines the IFF header structures and provides simple algorithms for directly writing many of your objects as chunks and containers.
Installation:
This library can be downloaded from SourceForge, as can its sole prerequisite:
libiff - The library source package.
uSTL - An STL implementation, required.
First, unpack and install uSTL, as described in its documentation. Unpack libiff and run ./configure; make install, which will install the library to /usr/local/lib and headers to /usr/local/include. ./configure --help lists available configuration options, in the usual autoconf fashion. The one thing to be aware of is that by default the library will not be completely conforming to EA85 specification. Why that is so, and why you should take the default options anyway, is discussed in detail in the next section. If you really want to use the original EA85 format, you can to pass --with-bigendian --with-2grain to configure.
Usage:
If you are using C++, chances are you already have an object-oriented design of some kind. You have a collection of objects, related to each other in some way, and you want to write them all to a file in some way. It is, of course, possible to just write them all to the file, one after the other, but that approach makes things difficult if you ever decide to change the structure of those objects, write more or fewer of them, or explain to other people how to read your format. Hence, it is desirable to create some kind of structure in the file, to be able to determine where each objects begins and ends, and what kind of object is where. When using an IFF format, youll make simple objects into chunks, and objects containing other objects into FORMs, LISTs, or CATs.
The first task is to make each of your objects readable and writable through uSTL streams. To do that youll need to define three methods, read, write, and stream_size, and create flow operator overrides with a STD_STREAMABLE macro. Here is a typical example:
#include < iff.h > // iff header includes ustl.h, but doesnt use the namespace.
using namespace ustl; // it is recommended to leave iff:: namespace on.
/// Stores players vital statistics.
class CPlayerStats {
public:
void read (istream& is);
void write (ostream& os) const;
size_t stream_size (void) const;
private:
uint16_t m_HP;
uint16_t m_MaxHP;
uint16_t m_Mana;
uint16_t m_MaxMana;
};
// Since the object is simple, and contains no other objects,
// well make it a simple chunk.
enum { // Define a chunk format for writing this object.
fmt_PlayerStats = IFF_FMT(S,T,A,T)
}; // In a hex editor youll see STAT at the beginning of the object
// making it easy to find when you want to hack something in it.
/// Reads the object from stream p is
void CPlayerStats::read (istream& is)
{
is >> m_HP >> m_MaxHP >> m_Mana >> m_MaxMana;
}
/// Writes the object to stream p os.
void CPlayerStats::write (ostream& os) const
{
os<<less
Download (0.026MB)
Added: 2006-12-07 License: MIT/X Consortium License Price:
1056 downloads
Common Data Format 3.1
Common Data Format is a self-describing data abstraction for the storage and manipulation of multidimensional data. more>>
Common Data Format is a self-describing data abstraction for the storage and manipulation of multidimensional data in a platform- and discipline-independent fashion.
It consists of a scientific data management package (known as the "CDF Library") that allows programmers and application developers to manage and manipulate scalar, vector, and multi-dimensional data arrays.
Enhancements:
- Adds new sets of APIs to allow Standard Interface to interact with zVariables and other CDF-related information.
- Adds MingW and FreeBSD ports.
- Adds support for Intel C++ and Fortran for Linux.
- Adds the ability to create legacy CDF 2.7 files.
- Fixes a bug that prevented directories from having .cdf or .skt extensions.
<<lessIt consists of a scientific data management package (known as the "CDF Library") that allows programmers and application developers to manage and manipulate scalar, vector, and multi-dimensional data arrays.
Enhancements:
- Adds new sets of APIs to allow Standard Interface to interact with zVariables and other CDF-related information.
- Adds MingW and FreeBSD ports.
- Adds support for Intel C++ and Fortran for Linux.
- Adds the ability to create legacy CDF 2.7 files.
- Fixes a bug that prevented directories from having .cdf or .skt extensions.
Download (1.5MB)
Added: 2006-03-13 License: Public Domain Price:
1320 downloads
File::Comments 0.07
File::Comments is a Perl module that ecognizes file formats and extracts format-specific comments. more>>
File::Comments is a Perl module that ecognizes file formats and extracts format-specific comments.
SYNOPSIS
use File::Comments;
my $snoop = File::Comments->new();
# *----------------
# | program.c:
# | /* comment */
# | main () {}
# *----------------
my $comments = $snoop->comments("program.c");
# => [" comment "]
# *----------------
# | script.pl:
# | # comment
# | print "howdy!n"; # another comment
# *----------------
my $comments = $snoop->comments("script.pl");
# => [" comment", " another comment"]
# or strip comments from a file:
my $stripped = $snoop->stripped("script.pl");
# => "print "howdy!n";"
# or just guess a files type:
my $type = $snoop->guess_type("program.c");
# => "c"
File::Comments guesses the type of a given file, determines the format used for comments, extracts all comments, and returns them as a reference to an array of chunks. Alternatively, it strips all comments from a file.
Currently supported are Perl scripts, C/C++ programs, Java, makefiles, JavaScript, Python and PHP.
The plugin architecture used by File::Comments makes it easy to add new formats. To support a new format, a new plugin module has to be installed. No modifications to the File::Comments codebase are necessary, new plugins will be picked up automatically.
File::Comments can also be used to simply guess a files type. It it somewhat more flexible than File::MMagic and File::Type. File types in File::Comments are typically based on file name suffixes (*.c, *.pl, etc.). If no suffix is available, or a given suffix is ambiguous (e.g. if several plugins have registered a handler for the same suffix), then the files content is used to narrow down the possibilities and arrive at a decision.
WARNING: THIS MODULE IS UNDER DEVELOPMENT, QUALITY IS ALPHA. IF YOU FIND BUGS, OR WANT TO CONTRIBUTE PLUGINS, PLEASE SEND THEM MY WAY.
<<lessSYNOPSIS
use File::Comments;
my $snoop = File::Comments->new();
# *----------------
# | program.c:
# | /* comment */
# | main () {}
# *----------------
my $comments = $snoop->comments("program.c");
# => [" comment "]
# *----------------
# | script.pl:
# | # comment
# | print "howdy!n"; # another comment
# *----------------
my $comments = $snoop->comments("script.pl");
# => [" comment", " another comment"]
# or strip comments from a file:
my $stripped = $snoop->stripped("script.pl");
# => "print "howdy!n";"
# or just guess a files type:
my $type = $snoop->guess_type("program.c");
# => "c"
File::Comments guesses the type of a given file, determines the format used for comments, extracts all comments, and returns them as a reference to an array of chunks. Alternatively, it strips all comments from a file.
Currently supported are Perl scripts, C/C++ programs, Java, makefiles, JavaScript, Python and PHP.
The plugin architecture used by File::Comments makes it easy to add new formats. To support a new format, a new plugin module has to be installed. No modifications to the File::Comments codebase are necessary, new plugins will be picked up automatically.
File::Comments can also be used to simply guess a files type. It it somewhat more flexible than File::MMagic and File::Type. File types in File::Comments are typically based on file name suffixes (*.c, *.pl, etc.). If no suffix is available, or a given suffix is ambiguous (e.g. if several plugins have registered a handler for the same suffix), then the files content is used to narrow down the possibilities and arrive at a decision.
WARNING: THIS MODULE IS UNDER DEVELOPMENT, QUALITY IS ALPHA. IF YOU FIND BUGS, OR WANT TO CONTRIBUTE PLUGINS, PLEASE SEND THEM MY WAY.
Download (0.012MB)
Added: 2007-06-09 License: Perl Artistic License Price:
868 downloads
Audio File Library 0.2.6
Audio File Library is a uniform API for accessing standard digital audio file formats. more>>
The Audio File Library provides a uniform and elegant API for accessing a variety of audio file formats, such as AIFF/AIFF-C, WAVE, NeXT/Sun .snd/.au, Berkeley/IRCAM/CARL Sound File, Audio Visual Research, Amiga IFF/8SVX, and NIST SPHERE. Supported compression formats are currently G.711 mu-law and A-law and IMA and MS ADPCM.
Key goals of the Audio File Library are file format transparency and data format transparency. The same calls for opening a file, accessing and manipulating audio metadata (e.g. sample rate, sample format, textual information, MIDI parameters), and reading/writing sample data will work with any supported audio file format. Likewise, the format of the audio data presented to the application need not be tied to the format of the data contained in the file.
The Audio File Library distributed under the GNU Library General Public License.
<<lessKey goals of the Audio File Library are file format transparency and data format transparency. The same calls for opening a file, accessing and manipulating audio metadata (e.g. sample rate, sample format, textual information, MIDI parameters), and reading/writing sample data will work with any supported audio file format. Likewise, the format of the audio data presented to the application need not be tied to the format of the data contained in the file.
The Audio File Library distributed under the GNU Library General Public License.
Download (0.36MB)
Added: 2005-04-14 License: LGPL (GNU Lesser General Public License) Price:
1655 downloads
Fortran::Format 0.90
Fortran::Format is a Perl module to read and write data according to a standard Fortran 77 FORMAT. more>>
Fortran::Format is a Perl module to read and write data according to a standard Fortran 77 FORMAT.
SYNOPSYS
use Fortran::Format;
my $f = Fortran::Format->new("2(N: ,I4,2X)");
print $f->write(1 .. 10);
# prints the following:
# N: 1 N: 2
# N: 3 N: 4
# N: 5 N: 6
# N: 7 N: 8
# N: 9 N: 10
# if you dont want to save the format object,
# just chain the calls:
Fortran::Format->new("2(N: ,I4,2X)")->write(1 .. 10);
This is a Perl implementation of the Fortran 77 formatted input/output facility. One possible use is for producing input files for old Fortran programs, making sure that their column-oriented records are rigorously correct. Fortran formats may also have some advantages over printf in some cases: it is very easy to output an array, reusing the format as needed; and the syntax for repeated columns is more concise. Unlike printf, for good or ill, Fortran-formatted fields never exceed their desired width. For example, compare
printf "%3d", 12345; # prints "12345"
print Fortran::Format->new("I3")->write(12345); # prints "***"
This implementation was written in pure Perl, with portability and correctness in mind. It implements the full ANSI standard for Fortran 77 Formats (or at least it should). It was not written with speed in mind, so if you need to process millions of records it may not be what you need.
<<lessSYNOPSYS
use Fortran::Format;
my $f = Fortran::Format->new("2(N: ,I4,2X)");
print $f->write(1 .. 10);
# prints the following:
# N: 1 N: 2
# N: 3 N: 4
# N: 5 N: 6
# N: 7 N: 8
# N: 9 N: 10
# if you dont want to save the format object,
# just chain the calls:
Fortran::Format->new("2(N: ,I4,2X)")->write(1 .. 10);
This is a Perl implementation of the Fortran 77 formatted input/output facility. One possible use is for producing input files for old Fortran programs, making sure that their column-oriented records are rigorously correct. Fortran formats may also have some advantages over printf in some cases: it is very easy to output an array, reusing the format as needed; and the syntax for repeated columns is more concise. Unlike printf, for good or ill, Fortran-formatted fields never exceed their desired width. For example, compare
printf "%3d", 12345; # prints "12345"
print Fortran::Format->new("I3")->write(12345); # prints "***"
This implementation was written in pure Perl, with portability and correctness in mind. It implements the full ANSI standard for Fortran 77 Formats (or at least it should). It was not written with speed in mind, so if you need to process millions of records it may not be what you need.
Download (0.018MB)
Added: 2007-04-20 License: Perl Artistic License Price:
925 downloads
SWF::Builder::ActionScript 0.15
SWF::Builder::ActionScript is a SWF ActionScript object. more>>
SWF::Builder::ActionScript is a SWF ActionScript object.
SYNOPSIS
$mc->frame_action(1)->compile( on(KeyPress, )->compile(move_mc(-5));
$mc_i->on(KeyPress, )->compile(move_mc(5));
$mc_i->on(EnterFrame)->r_rotate(15);
<<lessSYNOPSIS
$mc->frame_action(1)->compile( on(KeyPress, )->compile(move_mc(-5));
$mc_i->on(KeyPress, )->compile(move_mc(5));
$mc_i->on(EnterFrame)->r_rotate(15);
Download (0.16MB)
Added: 2007-01-02 License: Perl Artistic License Price:
1037 downloads
File::Maker 0.05
File::Maker is a Perl module that mimics a make by loading a database and calling targets methods. more>>
File::Maker is a Perl module that mimics a make by loading a database and calling targets methods.
SYNOPSIS
#####
# Subroutine interface
#
use File::Maker qw(load_db);
%data = load_db($pm);
######
# Object interface
#
require File::Maker;
$maker = $maker->load_db($pm);
$maker->make_targets(%targets, @targets, %options );
$maker->make_targets(%targets, %options );
$maker = new File::Maker(@options);
Generally, if a subroutine will process a list of options, @options, that subroutine will also process an array reference, @options, [@options], or hash reference, %options, {@options}. If a subroutine will process an array reference, @options, [@options], that subroutine will also process a hash reference, %options, {@options}. See the description for a subroutine for details and exceptions.
When porting low level C code from one architecture to another, makefiles do provide some level of automation and save some time. However, once Perl or another high-level language is up and running, the high-level language usually allows much more efficient use of programmers time; otherwise, whats point of the high-level language. Thus, makes great economically sense to switch from makefiles to high-level language.
The File::Maker program module provides a "make" style interface as shown in the herein above. The @targets contains a list of targets that mimics the targets of a makefile. The targets are subroutines written in Perl in a separate program module from the File::Maker. The separate target program module inherits the methods in the File::Maker program module as follows:
use File::Maker;
use vars qw( @ISA );
@ISA = qw(File::Maker);
The File::Maker methods will then find the target subroutines in the separate target program module.
The File::Maker provides for the loading of a hash from a program module to provide for the capabilities of defines in a makefile. The option pm = $file> tells File::Maker to load a database from the __DATA__ section of a program module that is in the Tie::Form format. The Tie::Form format is a very flexible lenient format that is about as close to a natural language form and still have the precision of being machine readable.
This provides a more flexible alternative to the defines in a makefile. The define hash is in a separate, very flexible form program module. This arrangement allows one target program module that inherits the File::Maker program module to produce as many different outputs as there are Tie::Form program modules.
<<lessSYNOPSIS
#####
# Subroutine interface
#
use File::Maker qw(load_db);
%data = load_db($pm);
######
# Object interface
#
require File::Maker;
$maker = $maker->load_db($pm);
$maker->make_targets(%targets, @targets, %options );
$maker->make_targets(%targets, %options );
$maker = new File::Maker(@options);
Generally, if a subroutine will process a list of options, @options, that subroutine will also process an array reference, @options, [@options], or hash reference, %options, {@options}. If a subroutine will process an array reference, @options, [@options], that subroutine will also process a hash reference, %options, {@options}. See the description for a subroutine for details and exceptions.
When porting low level C code from one architecture to another, makefiles do provide some level of automation and save some time. However, once Perl or another high-level language is up and running, the high-level language usually allows much more efficient use of programmers time; otherwise, whats point of the high-level language. Thus, makes great economically sense to switch from makefiles to high-level language.
The File::Maker program module provides a "make" style interface as shown in the herein above. The @targets contains a list of targets that mimics the targets of a makefile. The targets are subroutines written in Perl in a separate program module from the File::Maker. The separate target program module inherits the methods in the File::Maker program module as follows:
use File::Maker;
use vars qw( @ISA );
@ISA = qw(File::Maker);
The File::Maker methods will then find the target subroutines in the separate target program module.
The File::Maker provides for the loading of a hash from a program module to provide for the capabilities of defines in a makefile. The option pm = $file> tells File::Maker to load a database from the __DATA__ section of a program module that is in the Tie::Form format. The Tie::Form format is a very flexible lenient format that is about as close to a natural language form and still have the precision of being machine readable.
This provides a more flexible alternative to the defines in a makefile. The define hash is in a separate, very flexible form program module. This arrangement allows one target program module that inherits the File::Maker program module to produce as many different outputs as there are Tie::Form program modules.
Download (0.076MB)
Added: 2007-02-16 License: Perl Artistic License Price:
980 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above swf file format search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed