- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 452 for nbits (0.05 sec)
-
src/compress/bzip2/bzip2_test.go
var vectors = []struct { nbits uint // Number of bits to read value int // Expected output value (0 for error) fail bool // Expected operation failure? }{ {nbits: 1, value: 1}, {nbits: 1, value: 0}, {nbits: 1, value: 1}, {nbits: 5, value: 11}, {nbits: 32, value: 0x12345678}, {nbits: 15, value: 14495}, {nbits: 3, value: 6}, {nbits: 6, value: 13}, {nbits: 1, fail: true}, }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 09 19:12:23 UTC 2020 - 6.3K bytes - Viewed (0) -
src/compress/lzw/reader_test.go
{11, 2048 - 1024}, {12, 4096 - 2048}, } nCodes, nBits := 0, 0 for _, e := range iterations { nCodes += e.n nBits += e.n * e.width } if nCodes != 3839 { t.Fatalf("nCodes: got %v, want %v", nCodes, 3839) } if nBits != 43255 { t.Fatalf("nBits: got %v, want %v", nBits, 43255) } // Construct our input of 43255 zero bits (which gets d.hi and d.width up
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 18 16:57:58 UTC 2024 - 7.6K bytes - Viewed (0) -
src/compress/lzw/writer.go
} // writeLSB writes the code c for "Least Significant Bits first" data. func (w *Writer) writeLSB(c uint32) error { w.bits |= c << w.nBits w.nBits += w.width for w.nBits >= 8 { if err := w.w.WriteByte(uint8(w.bits)); err != nil { return err } w.bits >>= 8 w.nBits -= 8 } return nil } // writeMSB writes the code c for "Most Significant Bits first" data. func (w *Writer) writeMSB(c uint32) error {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 13:32:40 UTC 2024 - 7.9K bytes - Viewed (0) -
src/compress/lzw/reader.go
} // readLSB returns the next code for "Least Significant Bits first" data. func (r *Reader) readLSB() (uint16, error) { for r.nBits < r.width { x, err := r.r.ReadByte() if err != nil { return 0, err } r.bits |= uint32(x) << r.nBits r.nBits += 8 } code := uint16(r.bits & (1<<r.width - 1)) r.bits >>= r.width r.nBits -= r.width return code, nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 12 14:39:39 UTC 2023 - 8K bytes - Viewed (0) -
test/divmod.go
} } // generate all uint64 values x where x has at most n bits set in the low w // and call f(x) for each. func gen1(n, w int, f func(uint64)) { gen(0, 0, n, w-1, f) } func gen(val uint64, nbits, maxbits, pos int, f func(uint64)) { if pos < 0 { f(val) return } gen(val, nbits, maxbits, pos-1, f) if nbits < maxbits { gen(val|1<<uint(pos), nbits+1, maxbits, pos-1, f) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 9.3K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/rewrite_test.go
{10, 0xFFFF000000000001, 64, 63, 15, 0x400A3f10}, } for i, v := range tests { result := encodePPC64RotateMask(v.rotate, int64(v.mask), v.nbits) if result != v.encoded { t.Errorf("encodePPC64RotateMask(%d,0x%x,%d) = 0x%x, expected 0x%x", v.rotate, v.mask, v.nbits, result, v.encoded) } rotate, mb, me, mask := DecodePPC64RotateMask(result) if rotate != v.rotate || mb != v.mb || me != v.me || mask != v.mask {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 15 21:57:02 UTC 2021 - 6.9K bytes - Viewed (0) -
src/internal/zstd/bits.go
cnt uint32 // number of valid bits in the bits field } // makeBitReader makes a bit reader starting at off. func (r *Reader) makeBitReader(data block, off int) bitReader { return bitReader{ r: r, data: data, off: uint32(off), } } // moreBits is called to read more bits. // This ensures that at least 16 bits are available. func (br *bitReader) moreBits() error { for br.cnt < 16 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 18 20:34:13 UTC 2023 - 3.3K bytes - Viewed (0) -
test/codegen/bits.go
func bitSetTest(x int) bool { // amd64:"ANDL\t[$]9, AX" // amd64:"CMPQ\tAX, [$]9" return x&9 == 9 } // mask contiguous one bits func cont1Mask64U(x uint64) uint64 { // s390x:"RISBGZ\t[$]16, [$]47, [$]0," return x & 0x0000ffffffff0000 } // mask contiguous zero bits func cont0Mask64U(x uint64) uint64 { // s390x:"RISBGZ\t[$]48, [$]15, [$]0," return x & 0xffff00000000ffff }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 19:02:52 UTC 2024 - 7.8K bytes - Viewed (0) -
src/vendor/golang.org/x/net/http2/hpack/huffman.go
// cur is the bit buffer that has not been fed into n. // cbits is the number of low order bits in cur that are valid. // sbits is the number of bits of the symbol prefix being decoded. cur, cbits, sbits := uint(0), uint8(0), uint8(0) for _, b := range v { cur = cur<<8 | uint(b) cbits += 8 sbits += 8 for cbits >= 8 { idx := byte(cur >> (cbits - 8)) n = n.children[idx] if n == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 05 19:54:32 UTC 2022 - 5.8K bytes - Viewed (0) -
src/math/bits.go
Russ Cox <******@****.***> 1643915146 -0500
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 05 17:52:29 UTC 2022 - 1.9K bytes - Viewed (0)