mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 13:09:00 +00:00
(bit-writer) Do not clear buffer when creating a bit writer
This commit is contained in:
parent
43ca9c8a12
commit
2b8ab97ec1
@ -149,6 +149,8 @@ public class GammaCodedSequence implements Iterable<Integer>, CodedSequence {
|
||||
* or equal to zero.
|
||||
*/
|
||||
public static ByteBuffer encode(ByteBuffer workArea, IntList sequence) {
|
||||
workArea.clear();
|
||||
|
||||
var writer = new BitWriter(workArea);
|
||||
|
||||
writer.putGamma(sequence.size() + 1);
|
||||
|
@ -23,8 +23,6 @@ public class BitWriter {
|
||||
this.bitPosition = 0;
|
||||
this.currentValue = 0;
|
||||
this.totalMeaningfulBytes = 0;
|
||||
|
||||
underlying.clear();
|
||||
}
|
||||
|
||||
public void putBit(boolean value) {
|
||||
|
Loading…
Reference in New Issue
Block a user