Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var WithContext = dotc1z.WithContext
var WithDecoderMaxDecodedSize = dotc1z.WithDecoderMaxDecodedSize
var WithDecoderMaxMemory = dotc1z.WithDecoderMaxMemory
Functions ¶
func C1ZFileCheckHeader ¶
func C1ZFileCheckHeader(f io.ReadSeeker) (bool, error)
C1ZFileCheckHeader reads len(C1ZFileHeader) bytes from the given io.ReadSeeker and compares them to C1ZFileHeader. Returns true if the header is valid. Returns any errors from Read() or Seek(). If a nil error is returned, the given io.ReadSeeker will be pointing to the first byte of the stream, and is suitable to be passed to NewC1ZFileDecoder.
func NewC1FileReader ¶
NewC1FileReader returns a connectorstore.Reader implementation for the given sqlite db file path.
func NewC1ZFileDecoder ¶
func NewC1ZFileDecoder(f io.Reader, opts ...dotc1z.DecoderOption) (io.ReadCloser, error)
NewC1ZFileDecoder wraps a given .c1z io.Reader that validates the .c1z and decompresses/decodes the underlying file. Defaults: 32MiB max memory and 2GiB max decoded size You must close the resulting io.ReadCloser when you are done, do not forget to close the given io.Reader if necessary.
Types ¶
This section is empty.