// HLen returns the lengh of hash.
427663
func (db *DB) HLen(key []byte) (int64, error) {
	if err := checkKeySize(key); err != nil {
		return 0, err
	}

	return Int64(db.bucket.Get(db.hEncodeSizeKey(key)))
}
740843
func (enc *Encoding) DecodedLen(n int) int {
	if enc.padChar == NoPadding {
		// Unpadded data may end with partial block of 2-3 characters.
		return (n*6 + 7) / 8
	}
	// Padded base64 should always be a multiple of 4 characters in length.
	return n / 4 * 3
}
15050
func (m *MemEngine) Hash(_ context.Context, d []byte) Hash {
	sum := sha512.Sum512(d)
	return Hash(sum[:])
}
592612
func (c *Cache) Len() int {
	c.lock.RLock()
	length := c.lru.Len()
	c.lock.RUnlock()
	return length
}
1254327
func (z *StreamLexer) ShiftLen() int {
	n := z.start - z.prevStart
	z.prevStart = z.start
	return n
}
391952
func (w *Writer) BlocksLen() int {
	n := w.indexBlock.nEntries
	if w.pendingBH.length > 0 {
		// Includes the pending block.
		n++
	}
	return n
}
155301
func encodedLen(n int) int {
	const k = aes.BlockSize
	return n/k*k + k + overhead
}
687786
func matchLen(a, b []byte, max int) int {
	a = a[:max]
	b = b[:len(a)]
	for i, av := range a {
		if b[i] != av {
			return i
		}
	}
	return max
}
516320
func (h Hash) Set(key string, value interface{}) Hash {
	h[key] = Value(valueToBytes(value))
	return h
}
448885
func (bigger *Dataset) HashJoin(name string, smaller *Dataset, sortOption *SortOption) *Dataset {
	return smaller.Broadcast(name, len(bigger.Shards)).LocalHashAndJoinWith(name, bigger, sortOption)
}
636949
func hashLen17to32(s []byte, length uint32) uint64 {
	var a = fetch64(s) * k1
	var b = fetch64(s[8:])
	var c = fetch64(s[length-8:]) * k2
	var d = fetch64(s[length-16:]) * k0

	return hashLen16(rotate64(a-b, 43)+rotate64(c, 30)+d,
		a+rotate64(b^k3, 20)-c+uint64(length))
}
155980
func (udh *UDH) Len() int {
	return udh.IEI.Len() + udh.IELength.Len() + udh.IEData.Len()
}
565176
func (up *Unsubscribe) Len() int {
	ml := up.len()
	return headerLen(ml) + ml
}
741975
func (t *TxStructure) HGet(key []byte, field []byte) ([]byte, error) {
	dataKey := t.encodeHashDataKey(key, field)
	value, err := t.reader.Get(dataKey)
	if kv.ErrNotExist.Equal(err) {
		err = nil
	}
	return value, errors.Trace(err)
}
800881
func (d *Decoder) VarLen() (val uint32, readBytes uint32, err error) {
	buf := []byte{}
	var lastByte bool
	var n uint32

	for !lastByte {
		b, err := d.ReadByte()
		if err != nil {
			return 0, n, err
		}
		buf = append(buf, b)
		lastByte = (b>>7 == 0x0)
		n++
	}

	val, nUsed := DecodeVarint(buf)
	return val, uint32(nUsed), nil
}
625243
func (c *BigCache) Len() int {
	var len int
	for _, shard := range c.shards {
		len += shard.len()
	}
	return len
}
383069
func (block *BestBlock) HashStr() string {
	block.mtx.RLock()
	defer block.mtx.RUnlock()
	return block.hash
}