Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for decodeBit (0.14 sec)

  1. src/image/jpeg/huffman.go

    		code <<= 1
    	}
    	return 0, FormatError("bad Huffman code")
    }
    
    func (d *decoder) decodeBit() (bool, error) {
    	if d.bits.n == 0 {
    		if err := d.ensureNBits(1); err != nil {
    			return false, err
    		}
    	}
    	ret := d.bits.a&d.bits.m != 0
    	d.bits.n--
    	d.bits.m >>= 1
    	return ret, nil
    }
    
    func (d *decoder) decodeBits(n int32) (uint32, error) {
    	if d.bits.n < n {
    		if err := d.ensureNBits(n); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 17:08:05 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  2. src/encoding/gob/decgen.go

    		"bool",
    		"Bool",
    		`slice[i] = state.decodeUint() != 0`,
    	},
    	{
    		"complex64",
    		"Complex64",
    		`real := float32FromBits(state.decodeUint(), ovfl)
    		imag := float32FromBits(state.decodeUint(), ovfl)
    		slice[i] = complex(float32(real), float32(imag))`,
    	},
    	{
    		"complex128",
    		"Complex128",
    		`real := float64FromBits(state.decodeUint())
    		imag := float64FromBits(state.decodeUint())
    		slice[i] = complex(real, imag)`,
    	},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 14:15:38 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/runtime/embedded_test.go

    	if err != nil {
    		t.Fatalf("unexpected error: %v", err)
    	}
    	if errs := runtime.DecodeList(list, codec); len(errs) > 0 {
    		t.Fatalf("unexpected error: %v", errs)
    	}
    
    	list2, err := meta.ExtractList(list[3])
    	if err != nil {
    		t.Fatalf("unexpected error: %v", err)
    	}
    	if errs := runtime.DecodeList(list2, codec); len(errs) > 0 {
    		t.Fatalf("unexpected error: %v", errs)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 06 16:07:10 UTC 2020
    - 9.2K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/test/runtime_helper_test.go

    				ContentType: runtime.ContentTypeJSON,
    			},
    		},
    	}
    
    	_, codecs := TestScheme()
    	Codec := apitesting.TestCodec(codecs, testapigroup.SchemeGroupVersion)
    
    	if errs := runtime.DecodeList(pl.Items, Codec); len(errs) != 0 {
    		t.Fatalf("unexpected error %v", errs)
    	}
    	if pod, ok := pl.Items[1].(*testapigroup.Carp); !ok || pod.Name != "test" {
    		t.Errorf("object not converted: %#v", pl.Items[1])
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 01 19:31:12 UTC 2018
    - 1.5K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/runtime/helper.go

    			return obj, nil
    		}
    	}
    	return obj, nil
    }
    
    // DecodeList alters the list in place, attempting to decode any objects found in
    // the list that have the Unknown type. Any errors that occur are returned
    // after the entire list is processed. Decoders are tried in order.
    func DecodeList(objects []Object, decoders ...Decoder) []error {
    	errs := []error(nil)
    	for i, obj := range objects {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Dec 13 22:54:34 UTC 2023
    - 8.4K bytes
    - Viewed (0)
Back to top