Skip to main content

tensogram_core/
lib.rs

1// (C) Copyright 2026- ECMWF and individual contributors.
2//
3// This software is licensed under the terms of the Apache Licence Version 2.0
4// which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5// In applying this licence, ECMWF does not waive the privileges and immunities
6// granted to it by virtue of its status as an intergovernmental organisation nor
7// does it submit to any jurisdiction.
8
9pub mod decode;
10pub mod dtype;
11pub mod encode;
12pub mod error;
13pub mod file;
14pub mod framing;
15pub mod hash;
16pub mod iter;
17pub mod metadata;
18// Internal thread-dispatch helpers for the multi-threaded coding
19// pipeline.  Callers configure threading via `EncodeOptions.threads`
20// and `DecodeOptions.threads`; the constants
21// `DEFAULT_PARALLEL_THRESHOLD_BYTES` and `ENV_THREADS` are re-exported
22// at the crate root for documentation.
23mod parallel;
24pub mod pipeline;
25#[cfg(feature = "remote")]
26pub mod remote;
27pub mod streaming;
28pub mod types;
29pub mod validate;
30pub mod wire;
31
32pub use decode::{
33    DecodeOptions, decode, decode_descriptors, decode_metadata, decode_object, decode_range,
34    decode_range_from_payload,
35};
36pub use dtype::Dtype;
37pub use encode::{EncodeOptions, encode, encode_pre_encoded};
38pub use error::{Result, TensogramError};
39pub use file::TensogramFile;
40pub use framing::{scan, scan_file};
41pub use hash::{HashAlgorithm, compute_hash, verify_hash};
42pub use iter::{FileMessageIter, MessageIter, ObjectIter, messages, objects, objects_metadata};
43pub use metadata::{RESERVED_KEY, compute_common, verify_canonical_cbor};
44pub use parallel::{DEFAULT_PARALLEL_THRESHOLD_BYTES, ENV_THREADS};
45pub use pipeline::{DataPipeline, apply_pipeline};
46pub use streaming::StreamingEncoder;
47pub use tensogram_encodings::pipeline::CompressionBackend;
48pub use types::{
49    ByteOrder, DataObjectDescriptor, DecodedObject, GlobalMetadata, HashDescriptor, HashFrame,
50    IndexFrame,
51};
52pub use validate::{
53    FileIssue, FileValidationReport, IssueCode, IssueSeverity, ValidateOptions, ValidationIssue,
54    ValidationLevel, ValidationReport, validate_buffer, validate_file, validate_message,
55};
56pub use wire::{FrameType, MessageFlags};
57
58#[cfg(feature = "remote")]
59pub use remote::is_remote_url;