Skip to main content

to_buffer

Function to_buffer 

Source
pub fn to_buffer<H: HashTable>(
    jmap: &JMapInfo<H>,
    options: &IoOptions,
) -> Result<Vec<u8>>
Expand description

Write a JMapInfo to a byte buffer This function serializes the JMapInfo into the BCSV format, including the header, field definitions, entries, and string table

§Arguments

  • jmap - The JMapInfo instance to serialize
  • options - Options for endianness and string encoding

§Type

  • H - The type of hash table used by the JMapInfo, which must implement the HashTable trait

§Returns

A Result containing the serialized byte buffer if successful, or an error if serialization fails

TODO: This function is pretty complex and could use some refactoring to break it down into smaller functions