- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,081 for nbits (0.06 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/image/jpeg/writer.go
} // emit emits the least significant nBits bits of bits to the bit-stream. // The precondition is bits < 1<<nBits && nBits <= 16. func (e *encoder) emit(bits, nBits uint32) { nBits += e.nBits bits <<= 32 - nBits bits |= e.bits for nBits >= 8 { b := uint8(bits >> 24) e.writeByte(b) if b == 0xff { e.writeByte(0x00) } bits <<= 8 nBits -= 8 } e.bits, e.nBits = bits, nBits }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:45 UTC 2023 - 17.1K 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/flate/huffman_bit_writer.go
if w.err != nil { return } w.bits |= uint64(b) << w.nbits w.nbits += nb if w.nbits >= 48 { bits := w.bits w.bits >>= 48 w.nbits -= 48 n := w.nbytes bytes := w.bytes[n : n+6] bytes[0] = byte(bits) bytes[1] = byte(bits >> 8) bytes[2] = byte(bits >> 16) bytes[3] = byte(bits >> 24) bytes[4] = byte(bits >> 32) bytes[5] = byte(bits >> 40) n += 6 if n >= bufferFlushSize {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 29 22:59:14 UTC 2022 - 18.4K bytes - Viewed (0) -
src/runtime/mbitmap.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:18:55 UTC 2024 - 60K 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) -
src/math/big/natconv.go
nbits -= shift } // convert any partial leading digit and advance to next word if nbits == 0 { // no partial digit remaining, just advance w = x[k] nbits = _W } else { // partial digit in current word w (== x[k-1]) and next word x[k] w |= x[k] << nbits i-- s[i] = digits[w&mask] // advance w = x[k] >> (shift - nbits)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 18 17:59:44 UTC 2022 - 14.6K 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)