2024-08-31 00:31:29 -06:00
|
|
|
# ASV
|
2024-08-31 20:56:24 -06:00
|
|
|
|
|
|
|
[![Go Reference](https://pkg.go.dev/badge/git.tebibyte.media/sashakoshka/go-asv.svg)](https://pkg.go.dev/git.tebibyte.media/sashakoshka/go-asv)
|
|
|
|
|
2024-08-31 00:31:29 -06:00
|
|
|
This module allows encoding and decoding data using ASV (ASCII-separated
|
|
|
|
values). Data is organized into a hierarchy of files, groups, records, and
|
|
|
|
units, separated by ASCII FS, GS, RS, and US respectively.
|
|
|
|
|
|
|
|
An example stream of data...
|
|
|
|
```
|
|
|
|
record[US]one[RS]record[US]two[GS]record one in group two[FS]record one in file two
|
|
|
|
```
|
|
|
|
|
|
|
|
... Is parsed into:
|
|
|
|
```
|
|
|
|
Collection {
|
|
|
|
File {
|
|
|
|
Group {
|
|
|
|
Record {
|
|
|
|
"record",
|
|
|
|
"one",
|
|
|
|
},
|
|
|
|
Record {
|
|
|
|
"record",
|
|
|
|
"two",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Group {
|
|
|
|
Record {
|
|
|
|
"record one in group two",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
File {
|
|
|
|
Group {
|
|
|
|
Record {
|
|
|
|
"record one in file two",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Although it uses ASCII control characters, this module operates on UTF-8 text.
|