()
| 150 | } |
| 151 | |
| 152 | func (s *Splitter) checkSplit() (int, bool) { |
| 153 | splitBits := s.SplitBits |
| 154 | if splitBits == 0 { |
| 155 | splitBits = defaultSplitBits |
| 156 | } |
| 157 | h := s.rs.Sum32() |
| 158 | tz := bits.TrailingZeros32(h) |
| 159 | if tz >= splitBits { |
| 160 | return tz - splitBits, true |
| 161 | } |
| 162 | return 0, false |
| 163 | } |
| 164 | |
| 165 | // Tree arranges a sequence of chunks produced by a Splitter into a "hashsplit tree." |
| 166 | // The result is an iterator of TreeNode/level pairs in a particular order; |