MCPcopy Create free account
hub / github.com/BaseXdb/basex / newNum

Method newNum

basex-core/src/main/java/org/basex/util/Num.java:38–44  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 2

addNewIdsMethod · 0.95
addMethod · 0.95

Calls 3

lengthMethod · 0.95
setMethod · 0.95
sizeMethod · 0.95

Tested by

no test coverage detected