ark::compression

Enums

  • CompressionType (uint8_t)
    Enumerations representing the types of compressed blobs that are supported.

Variables

Defined in “ark/compression/framing.hh”:

  • constexpr uint8_t FOOTER_MAGIC= 0xf0
    A magic number to help us verify that the footer is valid.

Classes

Functions

Declared in “ark/compression/bz2_compression.hh”:

  • core::ByteBuffer bz2_compress(const std::string_view & data, int32_t level)
    Takes the given block of data and BZ2 compresses it, returning the result in a byte buffer.

  • core::ByteBuffer bz2_decompress(const std::string_view & data)
    Takes the given block of previously compressed BZ2 data and decompresses it, returning the result in a byte buffer.

  • core::ByteBuffer bz2_decompress(const std::string_view & data, size_t decompressed_size)
    Takes the given block of previously compressed BZ2 data and decompresses it, returning the result in a byte buffer. This differs in that you provide the decompressed size, so the footer is not actually read.

Declared in “ark/compression/compression.hh”:

  • core::ByteBuffer compress(const CompressionSettings & settings, const std::string_view & data)
    Compressed the given data blob with the specified compression settings, returning the result in a byte buffer.

  • core::ByteBuffer compress(CompressionType type, const std::string_view & data, int32_t level)
    Compressed the given data blob with the specified compression type, returning the result in a byte buffer.

    Some compression types take an optional level; this can be specified as the final parameter. This is often implementation-specific, but in general, higher numbers take longer and compress better.

  • core::ByteBuffer decompress(const std::string_view & data)
    Takes the given block of previously compressed data and decompresses it, using whatever algorithm was used to compress it previously, returning the result in a byte buffer.

Declared in “ark/compression/compression_type.hh”:

  • std::string compression_type_to_string(CompressionType type)
    Converts a compression type into a string.

  • CompressionType string_to_compression_type(const std::string & value)
    Converts a string into a compression type.

  • CompressionSettings string_to_compression_settings(const std::string & value)
    Converts a string into a compression level.

Declared in “ark/compression/framing.hh”:

  • void write_blob_footer(void * data, std::size_t data_size, CompressionType type, std::size_t object_size)
    Writes a footer to the end of the given buffer. This is written to the last few bytes of the given buffer. It’s expected that the provided buffer is the full compressed blob.

  • std::size_t read_blob_footer_size(const void * data, std::size_t data_size, CompressionType type)
    Reads a footer from the end of the given buffer. This is read from the last few bytes of the specified buffer. It’s expected that the provided buffer is the full compressed blob.

  • CompressionType read_blob_footer_type(const void * data, std::size_t data_size)
    Reads a footer from the end of the given buffer and returns the compression type that constructed this footer. Confirms magic numbers along the way. It’s expected that the provided buffer is the full compressed blob.

  • struct ark::compression::CompressedBlobFooter __attribute__()
    The header of a Swift message.

    A system-heartbeat message, sent to indicate the overall health of the system. The offset to translate from local time to GPS time for messages tagged as such. The baseline between 2 Swift devices. This contains the relative vector distance from the base station to the rover receiver with the NED coordinate system definde by the local WGS84 tangent plane centerd at the base station. Absolute geodetic coordinates and status (best available) with covariances See fix mode for the values. The orientation of the device, in vehicle body frame. The rotations should be applied intrinsically in the order yaw, pitch, and roll in order to rotate the from a frame aligned with the local-level NED frame to the vehicle body frame. The velocity in vehicle body frame. The x-axis points at the nose of the vehicle, y-axis points to the right-hand side, and z-axis points downward. The velocity in local NED (north/east/down) coordinate. This frame is defined as the local WGS84 tangent plane, centered on the current location. The velocity in ECEF coordinate frame. A log message (ASCII text) coming from the device. Absolute geodetic coordinates and status (best available). See fix mode for the values. This structure contains configuration information about the IMU. It is necessary to fully decode SwiftMsgImuRaw packets. Raw data from the IMU, containing accelerometer and gyroscope readings. The sense of measurements are aligned with the indications on the device itself. Reports UTC time. The flags indicate the source of the offset value and fix. A decoded GPS time message, from the Swift. Represents the time since the GPS epoch began; the week begins at the Saturday/Sunday transition. Measurement units come from the MSG_IMU_AUX.

Declared in “ark/compression/lz4_compression.hh”:

  • core::ByteBuffer lz4_compress(const std::string_view & data)
    Takes the given block of data and LZ4 compresses it, returning the result in a byte buffer.

  • core::ByteBuffer lz4_decompress(const std::string_view & data)
    Takes the given block of previously compressed LZ4 data and decompresses it, returning the result in a byte buffer.

Declared in “ark/compression/lzma_compression.hh”:

  • core::ByteBuffer lzma_compress(const std::string_view & data, int32_t level)
    Takes the given block of data and LZMA compresses it, returning the result in a byte buffer.

  • core::ByteBuffer lzma_decompress(const std::string_view & data)
    Takes the given block of previously compressed LZMA data and decompresses it, returning the result in a byte buffer.

Declared in “ark/compression/zstd_compression.hh”:

  • core::ByteBuffer zstd_compress(const std::string_view & data, int32_t level)
    Takes the given block of data and Zstd compresses it, returning the result in a byte buffer.

  • core::ByteBuffer zstd_decompress(const std::string_view & data)
    Takes the given block of previously compressed Zstd data and decompresses it, returning the result in a byte buffer.