- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for ScanBytes (0.04 sec)
-
internal/s3select/jstream/scanner_test.go
b.Run("large", func(b *testing.B) { for b.Loop() { benchmarkBufioScanner(largeInput) } }) } func benchmarkBufioScanner(b []byte) { s := bufio.NewScanner(bytes.NewReader(b)) s.Split(bufio.ScanBytes) for s.Scan() { s.Bytes() } } func BenchmarkBufioReader(b *testing.B) { b.Run("small", func(b *testing.B) { for b.Loop() { benchmarkBufioReader(smallInput) } })
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 3.1K bytes - Viewed (0) -
src/bufio/scan.go
func (s *Scanner) Split(split SplitFunc) { if s.scanCalled { panic("Split called after Scan") } s.split = split } // Split functions // ScanBytes is a split function for a [Scanner] that returns each byte as a token. func ScanBytes(data []byte, atEOF bool) (advance int, token []byte, err error) { if atEOF && len(data) == 0 { return 0, nil, nil } return 1, data[0:1], nil }
Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Wed May 21 18:05:26 UTC 2025 - 14.2K bytes - Viewed (0)