ApproxLen returns the approximate number of UIDs in the pb.UidPack object.
()
| 201 | |
| 202 | // ApproxLen returns the approximate number of UIDs in the pb.UidPack object. |
| 203 | func (d *Decoder) ApproxLen() int { |
| 204 | if d == nil { |
| 205 | return 0 |
| 206 | } |
| 207 | if d.Pack == nil { |
| 208 | return 0 |
| 209 | } |
| 210 | return int(d.Pack.BlockSize) * (len(d.Pack.Blocks) - d.blockIdx) |
| 211 | } |
| 212 | |
| 213 | type searchFunc func(int) bool |
| 214 |
no outgoing calls
no test coverage detected