🍮 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
tararchive member headers through acustard::Headerclass. 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::streamwith thecustard::Fileclass. Some details oftarformat are exposed to the application code but this header is useful for simple applications wanting onlytarfile support with no additional dependencies. custard_stream.hpp- adds to core support for serializing
custard::Headerthrough 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::iostreamsin the form of input and output filters. These filters may work along with Boost'sgzipandbzip2filters to add compressedtarstreams. Through the use of custard stream codec, most details of thetarformat 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
.npyfile format requiring minimal dependencies (nlohmann::json). pigenc_stream.hpp- adds to
pigenc.hppthe streaming of C++ numerical collection types such asEigen::Arrayandstd::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.