OptimFROG Lossless Audio Compressor, version 4.509 [2004.04.13]
Copyright (C) 1996-2004 Florin Ghido, all rights reserved.


OptimFROG is a new technology, sophisticated, high-performance lossless
audio compressor. It obtains asymptotically the best lossless audio
compression ratios. The new technology used herein is the generalized
stereo decorrelation concept (together with the optimal predictor),
which was first introduced with OptimFROG 4.0b in December 2001.


Legal facts & Disclaimer
========================

You may copy and distribute the package through BBS, FTP, and WEB
sites. Only the unmodified ZIP archive or executable installer archive
may be distributed or copied. OptimFROG is free for non-commercial use.

You are prohibited from:

  - charging a fee or requesting donations for the package;
  - distributing or including the package or any part of it in another
    products without prior written permission of the author;
  - using the package or any part of it for commercial purposes without
    prior written permission of the author;
  - distributing a modified package.

The package may be distributed on CD-ROM in the case where FTP sites
issue CD-ROMs of their collections.

OptimFROG IS DISTRIBUTED "AS IS". NO WARRANTY OF ANY KIND IS EXPRESSED
OR IMPLIED. YOU USE IT AT YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE
FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE
USING OR MISUSING THIS SOFTWARE. USE OF THIS SOFTWARE INDICATES YOU
AGREED TO THIS.


Features
========

This is a release version and it passed extensive successful testing on
around 37 GB of audio data. It uses algorithms mathematically proven to
be correct only. The base 4.5x file format is frozen.

OptimFROG 4.509 [2004.04.13] has the following notable features:

  - asymptotically the best lossless audio compression ratios
  - optimal support for all integer PCM wave formats up to 32 bits
  - fully featured foobar2000, dBpowerAMP, Winamp2, Winamp3, XMPlay,
    and XMMS input plug-ins for playback
  - fast operation, default mode encodes CD quality audio data at 12.4x
    real-time and decodes at 17.4x real-time on AMD Athlon XP 1800+
  - Win32 and Linux command line versions
  - simple to use, but powerful Windows GUI front-end, Kermit (made by
    Speek) available at http://home.wanadoo.nl/~w.speek/kermit.htm
  - extensible, streamable compressed format, tagging compatible
  - optimize option, further improving compression at no decoding cost
  - backward compatible with version 4.2x (decode only)
  - 64 bits large file support under Win32
  - full pipe support for encoding and decoding
  - full raw file support
  - quick verify compressed file integrity function
  - compatible with Exact Audio Copy, with ID3v1.1 tagging
  - extensible command line format
  - multiple file processing on the same command line, with wildcards
  - option to store MD5 of raw PCM input data and function to check it
  - option to delete source file after successful operation
  - option to copy source file time stamp to destination file
  - bitstream error resilience and transparent real-time recovery
  - fast seek with intelligent caching for plug-ins
  - ID3v1.1 and APEv2 read tagging support for plug-ins
  - streaming support (playing HTTP streams) for foobar2000 plug-in
  - Replay Gain compatible plug-ins for foobar2000 and Winamp3
  - fully featured SDK for using compressed files in any application

Not yet released, but will be available in the future versions:
  - multichannel support
  - recovery information at creation and repair for corrupted files
  - uLaw and ALaw data types support
  - automatic speed calculation for all encoding and decoding modes


Usage
=====

The name of the executable was changed from optimfrog to ofr in order
to avoid potential script errors, as the 4.2x version had only a simple
fixed command line syntax. The command line format is the following:

  ofr [command] [options] src1 [--output dst1] src2 [--output dst2] ...

You can also use the wildcards * and ? to match multiple source files
at once.


Available commands:

--encode
  encode WAV/RAW file(s) to OFR file(s)
--decode
  decode OFR file(s) to WAV/RAW file(s)
--info
  print information about OFR file(s), can be used with --verbose
--verify
  quick verify integrity of OFR file(s)
--check
  check raw PCM input data MD5 of OFR file(s)
--repair
  repair corrupted OFR file(s) [not yet released]
--speed
  compute encoding and decoding speed for all modes [not yet released]
--help
  display detailed parameter reference

Source files can be specified in any place. The output file name is
specified with --output name, it pairs with the last source file found
in the command line or if not specified, it is created by removing the
last source file extension and adding .ofr. You can specify - for
reading files from stdin or for writing files to stdout. However, when
encoding a non-seekable raw input file, the .ofr file must be seekable.
The 4.5alpha version files are not supported (as warned), but they can
be converted to the current version as presented later in this file.

The default command is encode for WAV files and decode for OFR files,
so you can safely skip --encode and --decode commands in most cases.


Available options:

--mode {fast|normal*|high|extra|best|highnew|extranew|bestnew}
  specify the compression mode to be used. The default value is normal.
  For general use, I recommend the normal, extra, and extranew modes

--silent
  be as silent as possible, but write error messages to stderr

--verbose
  be verbose, writing also the header information for the input audio
  files, useful for debugging formats. It can be used with --info to
  display additional information about OFR files

--overwrite
  overwrite any existing files without asking

--recovery
  add recovery information to file, for repairing header errors and
  sector level errors [not yet released]

--time
  display elapsed time for every operation

--md5
  when compressing, store MD5 of original raw PCM input data

--timestamp
  set destination file time stamp from source file

--deleteafter
  when compressing or decompressing, delete source file after
  successful operation. Use this option with caution


--raw
  for specifying raw input file(s)

--channelconfig {MONO|STEREO_LR}
  specify the channel configuration when using raw mode. The default
  value is STEREO_LR

--sampletype {UINT8|SINT8|UINT16|SINT16|UINT24|SINT24|UINT32|SINT32}
  specify sample type when using raw mode. The default value is SINT16

--rate frequency
  specify sample rate when using raw mode. The default value is 44100

--headersize size
  specify to save the first size bytes as header when using raw mode.
  The default value is 0


--seek {fast|normal*|slow|min}
  specify the amount of seek information that will be available in the
  compressed file. The default value is normal. For general use, I
  recommend normal and slow

--optimize {none|fast*|normal|high|best}
  specify the optimization level in the engine. In order to achieve
  optimal compression at all sample types, sample rates, and audio
  content, the core compression engine has the possibility to find the
  optimal values for its parameters, at the cost of slightly increased
  compression time only. The default recommended value is fast.
  Do not use normal (or even high or best) for this parameter unless
  encoding time does not matter and you want to obtain the smallest
  possible file for a given compression mode. The difference between
  the optimize levels fast and best (which is up to three times slower
  than fast) is very small, generally under 0.05%, but may be also
  larger in some rare cases. Note that the none optimize level is
  forced by the encoder to fast optimize level for the extra, best,
  highnew, extranew, and bestnew modes


Speed
~~~~~
Here is the approximate speed of operation for CD quality audio data
when running on AMD Athlon XP 1800+, given in multiples of real-time
performance. The decoding times are not influenced by the optimize
option used at the time of encoding.
The highnew, extranew, and bestnew modes use the SSE extensions for
speeding up some computations and if they are not present, the speed
is 70-80% of the original accelerated speed.

             encode  encode   decode
Optimize       none    fast     --
             ------  ------   ------
Mode
fast          28.1x   17.3x    24.7x
normal        19.1x   12.4x    17.4x
high          12.5x    8.5x    11.7x
extra            -     5.8x     8.0x
best             -     3.7x     5.0x
highnew          -     2.7x     4.0x
extranew         -     2.1x     3.4x
bestnew          -     1.2x     1.9x


Quick command line guidelines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For fastest compression

   ofr --mode fast --optimize none file.wav

For normal compression on low speed computers

   ofr file.wav

For high compression on medium speed computers

   ofr --mode extra file.wav

For higher compression on high speed computers

   ofr --mode extranew file.wav

For best compression on high speed computers

   ofr --mode bestnew --seek slow file.wav


To convert an ofr file from the older 4.2x version or to a new mode

  ofr --silent fileold.ofr --output - | ofr --encode - --output filenew.ofr

To convert an ofr file from the unsupported 4.5alpha version

  ofr45 --silent fileold.ofr --output - | ofr --encode - --output filenew.ofr


Contact
=======

If you have any questions, comments, suggestions or problems regarding
OptimFROG please don't hesitate to contact me at:

  FlorinGhido@yahoo.com

You can always find the newest version of OptimFROG at:

  http://LosslessAudioCompression.com

  http://ghido.shelter.ro
  http://ghido.go.to

