forked from fast-pack/JavaFastPFOR
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustCopy.java
More file actions
37 lines (27 loc) · 923 Bytes
/
Copy pathJustCopy.java
File metadata and controls
37 lines (27 loc) · 923 Bytes
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
/**
* This code is released under the
* Apache License Version 2.0 http://www.apache.org/licenses/.
*
* (c) Daniel Lemire, http://lemire.me/en/
*/
package me.lemire.integercompression;
public final class JustCopy implements IntegerCODEC {
@Override
public void compress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos) {
// Util.assertTrue(inpos.get()+inlength <= in.length);
System.arraycopy(in, inpos.get(), out, outpos.get(), inlength);
inpos.add(inlength);
outpos.add(inlength);
}
@Override
public void uncompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos) {
// Util.assertTrue(inpos.get()+inlength <= in.length);
System.arraycopy(in, inpos.get(), out, outpos.get(), inlength);
inpos.add(inlength);
outpos.add(inlength);
}
@Override
public String toString() {
return this.getClass().getName();
}
}