DIRECT2 is an encoding algorithm in which data appears unchanged in the compressed representation, and metadata is encoded in the same output stream, and in line with the data.
The basic notion of the DIRECT2 Encoding Algorithm is that data appears unchanged in the compressed representation, and metadata is encoded in the same output stream, and in line with the data.
The key to decoding the compressed data is recognizing what bytes are metadata and what bytes are data. The decoder MUST be able to identify the presence of metadata in the compressed and encoded data stream. Bitmasks are inserted periodically in the byte stream to provide this information to the decoder.
See: