- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for io (0.34 sec)
-
src/archive/zip/reader.go
} else { return &dirReader{io.EOF}, nil } } size := int64(f.CompressedSize64) r := io.NewSectionReader(f.zipr, f.headerOffset+bodyOffset, size) dcomp := f.zip.decompressor(f.Method) if dcomp == nil { return nil, ErrAlgorithm } var rc io.ReadCloser = dcomp(r) var desr io.Reader if f.hasDataDescriptor() {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 27.7K bytes - Viewed (0) -
src/bufio/scan.go
// The split function defaults to [ScanLines]. func NewScanner(r io.Reader) *Scanner { return &Scanner{ r: r, split: ScanLines, maxTokenSize: MaxScanTokenSize, } } // Err returns the first non-EOF error that was encountered by the [Scanner]. func (s *Scanner) Err() error { if s.err == io.EOF { return nil } return s.err }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Oct 23 09:06:30 GMT 2023 - 14.2K bytes - Viewed (0) -
lib/time/mkzip.go
// external zip tool is used or the ordering of file names in a directory // or the current time. package main import ( "archive/zip" "bytes" "flag" "fmt" "hash/crc32" "io/fs" "log" "os" "path/filepath" "strings" ) func usage() { fmt.Fprintf(os.Stderr, "usage: go run mkzip.go zoneinfo.zip\n") os.Exit(2) } func main() { log.SetPrefix("mkzip: ")
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Mar 04 17:32:07 GMT 2024 - 2.1K bytes - Viewed (0) -
src/bytes/example_test.go
import ( "bytes" "encoding/base64" "fmt" "io" "os" "sort" "strconv" "unicode" ) func ExampleBuffer() { var b bytes.Buffer // A Buffer needs no initialization. b.Write([]byte("Hello ")) fmt.Fprintf(&b, "world!") b.WriteTo(os.Stdout) // Output: Hello world! } func ExampleBuffer_reader() { // A Buffer can turn a string or a []byte into an io.Reader.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Mar 04 15:54:40 GMT 2024 - 15K bytes - Viewed (1) -
src/bytes/reader.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package bytes import ( "errors" "io" "unicode/utf8" ) // A Reader implements the io.Reader, io.ReaderAt, io.WriterTo, io.Seeker, // io.ByteScanner, and io.RuneScanner interfaces by reading from // a byte slice. // Unlike a [Buffer], a Reader is read-only and supports seeking.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 17:10:31 GMT 2023 - 3.9K bytes - Viewed (0) -
src/archive/tar/writer.go
default: return n, nil } } func (sw *sparseFileWriter) ReadFrom(r io.Reader) (n int64, err error) { rs, ok := r.(io.ReadSeeker) if ok { if _, err := rs.Seek(0, io.SeekCurrent); err != nil { ok = false // Not all io.Seeker can really seek } } if !ok { return io.Copy(struct{ io.Writer }{sw}, r) } var readLastByte bool pos0 := sw.pos
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 19.6K bytes - Viewed (0) -
src/archive/zip/struct.go
the ZIP64 format the 32 bit fields will be 0xffffffff and the 64 bit fields must be used instead. [ZIP specification]: https://support.pkware.com/pkzip/appnote */ package zip import ( "io/fs" "path" "time" ) // Compression methods. const ( Store uint16 = 0 // no compression Deflate uint16 = 8 // DEFLATE compressed ) const ( fileHeaderSignature = 0x04034b50
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 12.1K bytes - Viewed (0) -
src/archive/zip/zip_test.go
} rc.(*checksumReader).hash = fakeHash32{} for i := 0; i < chunks; i++ { _, err := io.ReadFull(rc, chunk) if err != nil { t.Fatal("read:", err) } } if frag := int(size % chunkSize); frag > 0 { _, err := io.ReadFull(rc, chunk[:frag]) if err != nil { t.Fatal("read:", err) } } gotEnd, err := io.ReadAll(rc) if err != nil { t.Fatal("read end:", err) }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 19.5K bytes - Viewed (0) -
src/cmd/asm/internal/asm/parse.go
// license that can be found in the LICENSE file. // Package asm implements the parser and instruction generator for the assembler. // TODO: Split apart? package asm import ( "fmt" "io" "log" "os" "strconv" "strings" "text/scanner" "unicode/utf8" "cmd/asm/internal/arch" "cmd/asm/internal/flags" "cmd/asm/internal/lex" "cmd/internal/obj" "cmd/internal/obj/arm64"
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Feb 21 14:34:57 GMT 2024 - 36.9K bytes - Viewed (0) -
src/archive/zip/reader_test.go
} for i, f := range z.File { r, err := f.Open() if err != nil { continue } if f.UncompressedSize64 < 1e6 { n, err := io.Copy(io.Discard, r) if i == 3 && err != io.ErrUnexpectedEOF { t.Errorf("File[3] error = %v; want io.ErrUnexpectedEOF", err) } if err == nil && uint64(n) != f.UncompressedSize64 { t.Errorf("file %d: bad size: copied=%d; want=%d", i, n, f.UncompressedSize64)
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 55.3K bytes - Viewed (0)