![]() |
Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
|
DEMO |
BYTE_STREAM_SPLIT encoding functions for float and double types. More...
Functions | |
| std::vector< uint8_t > | encode_float (const float *values, size_t count) |
| Encode float values using the BYTE_STREAM_SPLIT algorithm. | |
| std::vector< uint8_t > | encode_double (const double *values, size_t count) |
| Encode double values using the BYTE_STREAM_SPLIT algorithm. | |
| std::vector< float > | decode_float (const uint8_t *data, size_t size, size_t count) |
| Decode float values from BYTE_STREAM_SPLIT encoding. | |
| std::vector< double > | decode_double (const uint8_t *data, size_t size, size_t count) |
| Decode double values from BYTE_STREAM_SPLIT encoding. | |
BYTE_STREAM_SPLIT encoding functions for float and double types.
|
inline |
Decode double values from BYTE_STREAM_SPLIT encoding.
Reverses encode_double(): reassembles original IEEE 754 doubles from 8 byte-position streams. Returns an empty vector if size is insufficient to hold count double values.
| data | Pointer to the encoded data: [all byte0s]...[all byte7s]. |
| size | Size of the encoded data in bytes (must be >= count * 8). |
| count | Number of double values to decode. |
Definition at line 171 of file byte_stream_split.hpp.
|
inline |
Decode float values from BYTE_STREAM_SPLIT encoding.
Reverses encode_float(): reassembles original IEEE 754 floats from 4 byte-position streams. Returns an empty vector if size is insufficient to hold count float values.
| data | Pointer to the encoded data: [all byte0s][byte1s][byte2s][byte3s]. |
| size | Size of the encoded data in bytes (must be >= count * 4). |
| count | Number of float values to decode. |
Definition at line 136 of file byte_stream_split.hpp.
|
inline |
Encode double values using the BYTE_STREAM_SPLIT algorithm.
Splits each 8-byte IEEE 754 double by byte position, producing 8 contiguous byte streams. The output size is always 8 * count bytes. Particularly effective for financial time-series data where exponent bytes are highly repetitive across successive values.
| values | Pointer to count double values. |
| count | Number of double values to encode. |
8 * count. Definition at line 101 of file byte_stream_split.hpp.
|
inline |
Encode float values using the BYTE_STREAM_SPLIT algorithm.
Splits each 4-byte IEEE 754 float by byte position, producing 4 contiguous byte streams: all byte-0s, all byte-1s, all byte-2s, all byte-3s. The output size is always 4 * count bytes (identical to the input size, but rearranged for better compressibility).
| values | Pointer to count float values. |
| count | Number of float values to encode. |
4 * count. Definition at line 67 of file byte_stream_split.hpp.