1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
//! Comprehensive Tensor Serialization Framework
//!
//! This module provides a unified interface for tensor serialization across multiple
//! formats including binary, text, scientific, and machine learning formats.
//! The implementation is organized into specialized modules for maintainability
//! and feature modularity.
//!
//! # Supported Formats
//!
//! ## Core Formats
//! - **Binary**: Custom high-performance binary format with CRC32 validation
//! - **JSON**: Human-readable JSON format with metadata
//! - **NumPy**: NumPy `.npy` format for Python ecosystem compatibility
//!
//! ## Scientific Computing (Feature: `serialize-hdf5`)
//! - **HDF5**: Hierarchical data format with compression and chunking
//!
//! ## Data Science (Feature: `serialize-arrow`)
//! - **Arrow**: Columnar format optimized for analytics
//! - **Parquet**: Compressed columnar storage for big data
//!
//! # Usage Examples
//!
//! ```rust
//! use torsh_tensor::serialize::{SerializationOptions, SerializationFormat};
//! use torsh_tensor::Tensor;
//!
//! # fn example() -> torsh_core::error::Result<()> {
//! let tensor = Tensor::ones([2, 3], torsh_core::device::DeviceType::Cpu)?;
//!
//! // Save with auto-format detection
//! let options = SerializationOptions::default();
//! tensor.save("tensor.bin", &options)?;
//!
//! // Load with explicit format
//! let loaded = Tensor::<f32>::load("tensor.bin", Some(SerializationFormat::Binary))?;
//! # Ok(())
//! # }
//! ```
// Core serialization types and functionality
// Format-specific implementations
// Scientific computing formats
// Data science formats
// Machine learning formats
// Advanced I/O capabilities
// Re-export core types and functionality
pub use ;
// Core serialization functionality is available as methods on Tensor<T>
// Re-export format-specific functions
pub use ;
pub use ;
// Re-export scientific format functions
pub use ;
// Re-export data science format functions
pub use ;
// Re-export ML format functions
pub use ;
// Re-export streaming functionality
pub use ;
// Re-export tensor implementation from core module
// Serialization methods are available directly on Tensor<T> when the serialize feature is enabled
/// Convenient type alias for serialization results
pub type SerializeResult<T> = Result;
// Feature-gated module accessibility
pub use hdf5;
pub use ;
pub use onnx;
/// Prelude module for convenient imports