/
BitmapStorage.java
71 lines (64 loc) · 1.7 KB
/
BitmapStorage.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package com.googlecode.javaewah;
/*
* Copyright 2009-2013, Daniel Lemire, Cliff Moon, David McIntosh, Robert Becho, Google Inc. and Veronika Zenz
* Licensed under APL 2.0.
*/
/**
* Low level bitset writing methods.
*
* @since 0.4.0
* @author David McIntosh
*/
public interface BitmapStorage {
/**
* Adding words directly to the bitmap (for expert use).
*
* This is normally how you add data to the array. So you add bits in streams
* of 8*8 bits.
*
* @param newdata
* the word
*/
public void add(final long newdata);
/**
* if you have several literal words to copy over, this might be faster.
*
* @param data
* the literal words
* @param start
* the starting point in the array
* @param number
* the number of literal words to add
*/
public void addStreamOfLiteralWords(final long[] data, final int start,
final int number);
/**
* For experts: You want to add many zeroes or ones? This is the method you
* use.
*
* @param v
* zeros or ones
* @param number
* how many to words add
*/
public void addStreamOfEmptyWords(final boolean v, final long number);
/**
* Like "addStreamOfLiteralWords" but negates the words being added.
*
* @param data
* the literal words
* @param start
* the starting point in the array
* @param number
* the number of literal words to add
*/
public void addStreamOfNegatedLiteralWords(long[] data, final int start,
final int number);
/**
* directly set the sizeinbits field
*
* @param bits
* number of bits
*/
public void setSizeInBits(final int bits);
}