|
| 1 | +package io.indexr.vlt.codec; |
| 2 | + |
| 3 | +import io.indexr.util.Wrapper; |
| 4 | + |
| 5 | +/** |
| 6 | + * Returns the encoded data size. |
| 7 | + */ |
| 8 | +public interface Encoder { |
| 9 | + default int encodeInts(int valCount, long inputAddr, long outputAddr, int outputLimit) { |
| 10 | + return encodeInts(valCount, inputAddr, outputAddr, outputLimit, new Wrapper()); |
| 11 | + } |
| 12 | + |
| 13 | + default int encodeInts(int valCount, long inputAddr, long outputAddr, int outputLimit, Wrapper extraInfo) { |
| 14 | + throw new UnsupportedOperationException(); |
| 15 | + } |
| 16 | + |
| 17 | + default int encodeLongs(int valCount, long inputAddr, long outputAddr, int outputLimit) { |
| 18 | + return encodeLongs(valCount, inputAddr, outputAddr, outputLimit, new Wrapper()); |
| 19 | + } |
| 20 | + |
| 21 | + default int encodeLongs(int valCount, long inputAddr, long outputAddr, int outputLimit, Wrapper extraInfo) { |
| 22 | + throw new UnsupportedOperationException(); |
| 23 | + } |
| 24 | + |
| 25 | + default int encodeFloats(int valCount, long inputAddr, long outputAddr, int outputLimit) { |
| 26 | + return encodeFloats(valCount, inputAddr, outputAddr, outputLimit, new Wrapper()); |
| 27 | + } |
| 28 | + |
| 29 | + default int encodeFloats(int valCount, long inputAddr, long outputAddr, int outputLimit, Wrapper extraInfo) { |
| 30 | + throw new UnsupportedOperationException(); |
| 31 | + } |
| 32 | + |
| 33 | + default int encodeDoubles(int valCount, long inputAddr, long outputAddr, int outputLimit) { |
| 34 | + return encodeDoubles(valCount, inputAddr, outputAddr, outputLimit, new Wrapper()); |
| 35 | + } |
| 36 | + |
| 37 | + default int encodeDoubles(int valCount, long inputAddr, long outputAddr, int outputLimit, Wrapper extraInfo) { |
| 38 | + throw new UnsupportedOperationException(); |
| 39 | + } |
| 40 | + |
| 41 | + default int encodeStrings(int valCount, long inputAddr, long outputAddr, int outputLimit) { |
| 42 | + return encodeStrings(valCount, inputAddr, outputAddr, outputLimit, new Wrapper()); |
| 43 | + } |
| 44 | + |
| 45 | + default int encodeStrings(int valCount, long inputAddr, long outputAddr, int outputLimit, Wrapper extraInfo) { |
| 46 | + throw new UnsupportedOperationException(); |
| 47 | + } |
| 48 | + |
| 49 | +} |
0 commit comments