Creates a new number array, in which the first four bytes contain the number of occupied bytes. @param value initial value to be compressed and stored @return new number array
(final int value)
| 36 | * @return new number array |
| 37 | */ |
| 38 | public static byte[] newNum(final int value) { |
| 39 | final int len = length(value); |
| 40 | final byte[] array = new byte[4 + len]; |
| 41 | set(array, value, 4, len); |
| 42 | size(array, 4 + len); |
| 43 | return array; |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Creates a compressed representation of the specified value. |