{"modulePath":"github.com/matrixorigin/simdcsv","version":"v0.0.0-20230210060146-09b8e45209dd","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package simdcsv\n\n## Functions\n\n```go\nfunc ReadCountString(r *csv.Reader, cnt int, records [][]string) ([][]string, int, error)\n```\n\n```go\nfunc ReadCountStringLimitSize(r *csv.Reader, ctx context.Context, cnt int, size uint64, records [][]string) ([][]string, int, bool, error)\n```\n\n```go\nfunc SupportedCPU() bool\n```\nSupportedCPU will return whether the CPU is supported.\n\n## Types\n\n```go\ntype LineOut struct {\n\tLines [][]string\n\tLine  []string\n}\n```\n\n```go\ntype OutputCallback func(LineOut) error\n```\n\n```go\ntype Reader struct {\n\t// Comma is the field delimiter.\n\t// It is set to comma (',') by NewReader.\n\t// Comma must be a valid rune and must not be \\r, \\n,\n\t// or the Unicode replacement character (0xFFFD).\n\tComma rune\n\n\t// Comment, if not 0, is the comment character. Lines beginning with the\n\t// Comment character without preceding whitespace are ignored.\n\t// With leading whitespace the Comment character becomes part of the\n\t// field, even if TrimLeadingSpace is true.\n\t// Comment must be a valid rune and must not be \\r, \\n,\n\t// or the Unicode replacement character (0xFFFD).\n\t// It must also not be equal to Comma.\n\tComment rune\n\n\t// FieldsPerRecord is the number of expected fields per record.\n\t// If FieldsPerRecord is positive, Read requires each record to\n\t// have the given number of fields. If FieldsPerRecord is 0, Read sets it to\n\t// the number of fields in the first record, so that future records must\n\t// have the same field count. If FieldsPerRecord is negative, no check is\n\t// made and records may have a variable number of fields.\n\tFieldsPerRecord int\n\n\t// If LazyQuotes is true, a quote may appear in an unquoted field and a\n\t// non-doubled quote may appear in a quoted field.\n\tLazyQuotes bool\n\n\t// If TrimLeadingSpace is true, leading white space in a field is ignored.\n\t// This is done even if the field delimiter, Comma, is white space.\n\tTrimLeadingSpace bool\n\n\tReuseRecord   bool // Deprecated: Unused by simdcsv.\n\tTrailingComma bool // Deprecated: No longer used.\n\n\t//for debug\n\tBegin                  time.Time\n\tStage1_first_chunk     time.Duration\n\tStage1_end             time.Duration\n\tStage2_first_chunkinfo [5]time.Duration\n\tStage2_end             [5]time.Duration\n\tReadLoop_first_records time.Duration\n\tEnd                    time.Duration\n\t// contains filtered or unexported fields\n}\n```\nA Reader reads records from a CSV-encoded file.\n\nAs returned by NewReader, a Reader expects input conforming to RFC 4180. The exported fields can be changed to customize the details before the first call to Read or ReadAll.\n\nThe Reader converts all \\\\r\\\\n sequences in its input to plain \\\\n, including in multiline field values, so that the returned data does not depend on which line-ending convention an input file uses.\n\n```go\nfunc NewReader(r io.Reader) *Reader\n```\nNewReader returns a new Reader that reads from r.\n\n```go\nfunc NewReaderWithOptions(r io.Reader, cma, cmnt rune, lazyQt, tls bool) *Reader\n```\nNewReader returns a new Reader with options that reads from r.\n\n```go\nfunc (r *Reader) Close()\n```\n\n```go\nfunc (r *Reader) Read(cnt int, ctx context.Context, records [][]string) ([][]string, int, error)\n```\nRead reads len count records from r. Each record is a slice of fields. A successful call returns err == nil, not err == io.EOF. Because ReadAll is defined to read until EOF, it does not treat end of file as an error to be reported.\n\n```go\nfunc (r *Reader) ReadAll(ctx context.Context) ([][]string, error)\n```\nReadAll reads all the remaining records from r. Each record is a slice of fields. A successful call returns err == nil, not err == io.EOF. Because ReadAll is defined to read until EOF, it does not treat end of file as an error to be reported.\n\n```go\nfunc (r *Reader) ReadLimitSize(cnt int, ctx context.Context, size uint64, records [][]string) ([][]string, int, bool, error)\n```\nRead reads len count records from r. Each record is a slice of fields. A successful call returns err == nil, not err == io.EOF. Because ReadAll is defined to read until EOF, it does not treat end of file as an error to be reported.\n\n```go\nfunc (r *Reader) ReadLoop(inputCtx context.Context, lineOutChan chan LineOut, callback OutputCallback) (err error)\n```\nReadLoop reads all the remaining records from r.\n\n","path":"github.com/matrixorigin/simdcsv","name":"simdcsv","synopsis":"","isRedistributable":true}
