An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/mikewiacek/record

Package record reads and writes sequences of records. Each record is a stream of bytes that completes before the next record starts. When reading, call Next to obtain an io.Reader for the next record. Next will return io.EOF when there are no more records. It is valid to call Next without reading the current record to exhaustion. When writing, call Next to obtain an io.Writer for the next record. Calling Next finishes the current record. Call Close to finish the final record. Optionally, call Flush to finish the current record and flush the underlying writer without starting a new record. To start a new record after flushing, call Next. Neither Readers or Writers are safe to use concurrently. Example code: The wire format is that the stream is divided into 2MiB blocks, and each block contains a number of tightly packed chunks. Chunks cannot cross block boundaries. The last block may be shorter than 2 MiB. Any unused bytes in a block must be zero. A record maps to one or more chunks. Each chunk has a 8 byte header (a 4 byte checksum, a 3 byte little-endian uint24 length, and a 1 byte chunk type) followed by a payload. The checksum is over the chunk type and the payload. There are four chunk types: whether the chunk is the full record, or the first, middle or last chunk of a multi-chunk record. A multi-chunk record has one first chunk, zero or more middle chunks, and one last chunk. The wire format allows for limited recovery in the face of data corruption: on a format error (such as a checksum mismatch), the reader moves to the next block and looks for the next full or first chunk.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/mikewiacek/record
License: BSD-3-Clause
Latest release: almost 2 years ago
First release: over 2 years ago
Namespace: github.com/mikewiacek
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: about 2 months ago

    Loading...
    Readme
    Loading...