Compresses and adds a value to the specified array and returns the resulting array. @param array input array @param value value to be added @return resulting array (can be the same as input array)
(final byte[] array, final int value)
| 63 | * @return resulting array (can be the same as input array) |
| 64 | */ |
| 65 | public static byte[] add(final byte[] array, final int value) { |
| 66 | final int len = length(value); |
| 67 | final int pos = size(array); |
| 68 | final byte[] tmp = check(array, pos, len); |
| 69 | set(tmp, value, pos, len); |
| 70 | size(tmp, pos + len); |
| 71 | return tmp; |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * Decompresses and returns a value from the specified byte array. |