🍮 custard

1 Overview

custard provides support for reading and writing data in tar format to C++ applications in the form of a few "single-file, header-only" libraries. An application may include only those headers needed to provide desired functionality:

custard.hpp
core support for encoding and decoding tar archive member headers through a custard::Header class. The codec is via class methods and not I/O is provided. Applications that wish to handle I/O may find this header useful on its own.
custard_file.hpp
adds to core support for simple I/O via std::stream with the custard::File class. Some details of tar format are exposed to the application code but this header is useful for simple applications wanting only tar file support with no additional dependencies.
custard_stream.hpp
adds to core support for serializing custard::Header through the simple custard stream codec (described below). On its own, this library is not useful to an application developer but provides base support for more useful libraries.
custard_boost.hpp
adds core and stream support for boost::iostreams in the form of input and output filters. These filters may work along with Boost's gzip and bzip2 filters to add compressed tar streams. Through the use of custard stream codec, most details of the tar format need not be exposed to the application.

custard also provides pigenc (still under development and may be broken out). It provides this functionality:

pigenc.hpp
provides a codec compatible with Numpy .npy file format requiring minimal dependencies (nlohmann::json).
pigenc_stream.hpp
adds to pigenc.hpp the streaming of C++ numerical collection types such as Eigen::Array and std::vector

2 TODO

This package is still under major development

  • [ ] version strings
  • [ ] factor pigenc to allow use w/ or w/out custard
  • [ ] real installation (pkg-config, cmake)
  • [ ] copying info in each file

3 Installation

Currently, no special installation method is provided. A developer may, for example, copy the desired headers into their source.

See below for license info.

4 Testing and examples

The package provides a number of test_*.cpp program source files which test proper function and serve as an example. They can be built and exercised by typing:

$ make

The tests may be run separate from building with:

$ bats test.bats

5 Names

The name custard comes from the mashing of C++ and the ustar "magic" string in tar files. The name pigenc is somehow a mash of "Python", "Numpy", "Eigen" and "encode".

6 License

custard is free software and may be used under the terms described in the file COPYING.

Author: BV

Created: 2021-08-15 Sun 13:10

Validate