# Results

struct Results

  This struct is used to return the results of compression and/or decompression operations.

  Subclassed by atc::TypedResults< dtype >

  Public Members

  std::vector<char> compressed_data

    Compressed data, set during compression when compressing to an `std::vector<char>`.

  size_t compressed_size = 0

    Size of compressed object in bytes. Set during compression.

  double compression_factor = 0

    The size of the original data divided by the size of the compressed object. Set during compression.

  std::vector<size_t> decompressed_sizes

    Mode sizes of the decompressed output tensor. Set during decompression.

  double error = std::numeric_limits<double>::quiet_NaN()

    Actual error after compression/decompression, expressed in the error metric determined by the option `error_metric`. Calculated and stored only when requested during `compress_decompress` using the option `calculate_error`.

  std::map<std::string, double> timings

    Map of labeled timings, stored in seconds. Set during compression and/or decompression when the option `timings` is enabled.

template<typename dtype>
struct TypedResults : public atc::Results

  This struct extends `atc::Results` with an `std::vector<dtype>` field and is used when decompressing to an `std::vector<dtype>`.

  Public Functions

  inline TypedResults(const Results &results)

    Create a `atc::TypedResults` object using a copy of a base `atc::Results` object.

  Public Members

  std::vector<dtype> decompressed_data

    Decompressed data, set during decompression when decompressing to an `std::vector<dtype>`.