Module compat

Module compat 

Source
Expand description

Read-only backwards compatibility with zTensor v0.1.0 format.

This module provides legacy support for reading v0.1.0 files. To drop legacy support, simply remove this file and the pub mod compat; line from lib.rs.

v0.1.0 differences:

  • Magic: “ZTEN0001” (vs “ZTEN1000” in v1.1)
  • No footer magic
  • Manifest is a CBOR array (not map with “objects”)
  • Each tensor has: name, offset, size, dtype, shape, encoding, layout
  • dtype strings: “float32” vs “f32”

Structs§

LegacyReader
Reader for legacy v0.1.0 zTensor files.

Functions§

is_legacy_file
Checks if a file at path is v0.1.0 format.
is_legacy_format
Checks if a file is v0.1.0 format by reading magic.