- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for HuffmanEncodeLength (0.18 sec)
-
src/vendor/golang.org/x/net/http2/hpack/huffman.go
} // case 4: y := uint32(x) return append(dst, byte(y>>24), byte(y>>16), byte(y>>8), byte(y)) } // HuffmanEncodeLength returns the number of bytes required to encode // s in Huffman codes. The result is round up to byte boundary. func HuffmanEncodeLength(s string) uint64 { n := uint64(0) for i := 0; i < len(s); i++ { n += uint64(huffmanCodeLen[s[i]]) } return (n + 7) / 8
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/vendor/golang.org/x/net/http2/hpack/encode.go
// // s will be encoded in Huffman codes only when it produces strictly // shorter byte string. func appendHpackString(dst []byte, s string) []byte { huffmanLength := HuffmanEncodeLength(s) if huffmanLength < uint64(len(s)) { first := len(dst) dst = appendVarInt(dst, 7, huffmanLength) dst = AppendHuffmanString(dst, s) dst[first] |= 0x80 } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 22 17:16:14 UTC 2022 - 7.1K bytes - Viewed (0)