Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 145 for Decoder (0.07 sec)

  1. internal/s3select/jstream/decoder.go

    func (d *Decoder) Pos() int { return int(d.pos) }
    
    // Err returns the most recent decoder error if any, or nil
    func (d *Decoder) Err() error { return d.err }
    
    // MaxDepth will set the maximum recursion depth.
    // If the maximum depth is exceeded, ErrMaxDepth is returned.
    // Less than or 0 means no limit (default).
    func (d *Decoder) MaxDepth(n int) *Decoder {
    	d.maxDepth = n
    	return d
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  2. internal/store/queuestore.go

    		return
    	}
    
    	var decoder *jsoniter.Decoder
    	if key.Compress {
    		decodedBytes, err := s2.Decode(nil, raw)
    		if err != nil {
    			return nil, err
    		}
    		decoder = jsoniter.ConfigCompatibleWithStandardLibrary.NewDecoder(bytes.NewReader(decodedBytes))
    	} else {
    		decoder = jsoniter.ConfigCompatibleWithStandardLibrary.NewDecoder(bytes.NewReader(raw))
    	}
    
    	for decoder.More() {
    		var item I
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  3. internal/s3select/jstream/decoder_test.go

    		body    = `[{"bio":"bada bing bada boom","id":1,"name":"Charles","falseVal":false}]`
    	)
    
    	decoder := NewDecoder(mkReader(body), 1)
    
    	for mv = range decoder.Stream() {
    		counter++
    		t.Logf("depth=%d offset=%d len=%d (%v)", mv.Depth, mv.Offset, mv.Length, mv.Value)
    	}
    
    	if err := decoder.Err(); err != nil {
    		t.Fatalf("decoder error: %s", err)
    	}
    }
    
    func TestDecoderNested(t *testing.T) {
    	var (
    		counter int
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  4. internal/s3select/json/reader.go

    // Reader - JSON record reader for S3Select.
    type Reader struct {
    	args       *ReaderArgs
    	decoder    *jstream.Decoder
    	valueCh    chan *jstream.MetaValue
    	readCloser io.ReadCloser
    }
    
    // Read - reads single record.
    func (r *Reader) Read(dst sql.Record) (sql.Record, error) {
    	v, ok := <-r.valueCh
    	if !ok {
    		if err := r.decoder.Err(); err != nil {
    			return nil, errJSONParsingError(err)
    		}
    		return nil, io.EOF
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  5. internal/s3select/jstream/README.md

    we can choose to extract and act only the objects within the top-level array:
    ```go
    f, _ := os.Open("input.json")
    decoder := jstream.NewDecoder(f, 1) // extract JSON values at a depth level of 1
    for mv := range decoder.Stream() {
      fmt.Printf("%v\n ", mv.Value)
    }
    ```
    
    output:
    ```
    map[desc:RGB colors:[red green blue]]
    map[desc:CMYK colors:[cyan magenta yellow black]]
    ```
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  6. internal/s3select/csv/args.go

    }
    
    // IsEmpty - returns whether reader args is empty or not.
    func (args *ReaderArgs) IsEmpty() bool {
    	return !args.unmarshaled
    }
    
    // UnmarshalXML - decodes XML data.
    func (args *ReaderArgs) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error) {
    	args.FileHeaderInfo = none
    	args.RecordDelimiter = defaultRecordDelimiter
    	args.FieldDelimiter = defaultFieldDelimiter
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 20 18:31:45 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  7. internal/s3select/select.go

    		// writer is set later by Reset() before using it.
    		return bufio.NewWriter(xioutil.Discard)
    	},
    }
    
    // UnmarshalXML - decodes XML data.
    func (c *CompressionType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
    	var s string
    	if err := d.DecodeElement(&s, &start); err != nil {
    		return errMalformedXML(err)
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Sep 22 00:33:43 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  8. guava/src/com/google/common/base/Utf8.java

      /**
       * Returns {@code true} if {@code bytes} is a <i>well-formed</i> UTF-8 byte sequence according to
       * Unicode 6.0. Note that this is a stronger criterion than simply whether the bytes can be
       * decoded. For example, some versions of the JDK decoder will accept "non-shortest form" byte
       * sequences, but encoding never reproduces these. Such byte sequences are <i>not</i> considered
       * well-formed.
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 13:00:28 UTC 2024
    - 7K bytes
    - Viewed (0)
  9. lib/wasm/wasm_exec.js

    	}
    
    	if (!globalThis.TextDecoder) {
    		throw new Error("globalThis.TextDecoder is not available, polyfill required");
    	}
    
    	const encoder = new TextEncoder("utf-8");
    	const decoder = new TextDecoder("utf-8");
    
    	globalThis.Go = class {
    		constructor() {
    			this.argv = ["js"];
    			this.env = {};
    			this.exit = (code) => {
    				if (code !== 0) {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Aug 30 19:15:21 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  10. cmd/storage-rest-client.go

    	if err != nil {
    		for i := range errs {
    			errs[i] = toStorageErr(err)
    		}
    		return errs
    	}
    
    	dErrResp := &DeleteVersionsErrsResp{}
    	decoder := msgpNewReader(reader)
    	defer readMsgpReaderPoolPut(decoder)
    	if err = dErrResp.DecodeMsg(decoder); err != nil {
    		for i := range errs {
    			errs[i] = toStorageErr(err)
    		}
    		return errs
    	}
    
    	for i, dErr := range dErrResp.Errs {
    		if dErr != "" {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Oct 13 13:07:21 UTC 2024
    - 30.2K bytes
    - Viewed (0)
Back to top