bufpak


bufpak, a FORTRAN77 code which reads and writes data to an unformatted, direct access file.

An unformatted, direct access file is "compact". This is because the data is stored in a binary format, which usually takes less space than the corresponding formatted data. For instance, an unformatted REAL value takes one word of four bytes, whereas a REAL value formatted, with say, the "E14.6" format, would take 14 bytes, requiring four words of storage.

Note that the saving will vary depending on the data type. In particular, BUFPAK does not do a good job of compressing LOGICAL or CHARACTER data, so that they might actually require MORE space than in a formatted file... But BUFPAK is designed for space efficiency in numerical applications.

An unformatted, direct access file is "portable". This is because the file should contain "pure data". There should be no carriage returns, record counters, padding blanks, or other items added by the operating system. Other types of files will usually have such information inserted into the data, in a system dependent way, which makes the files much less transportable.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages:

bufpak is available in a FORTRAN77 version.

Related Programs:

bufpak_test

Source Code:


Last revised on 12 September 2023.