module

C0::CSV

Class methods

from_csv(input : String, group_name : String = "data") : Bytes

Convert CSV text to C0DATA compact bytes.

The first row is treated as headers, remaining rows as records. The result is a single group (GS + name + SOH headers + RS records).

Source
to_csv(buf : Bytes) : String

Convert C0DATA compact bytes to CSV text.

Expects a buffer containing at least one group with tabular data. Outputs headers (if present) as the first row, then each record.

Source