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

Method textRef

basex-core/src/main/java/org/basex/data/DiskData.java:365–377  ·  view source on GitHub ↗
(final byte[] value, final boolean text)

Source from the content-addressed store, hash-verified

363 }
364
365 @Override
366 protected long textRef(final byte[] value, final boolean text) {
367 // try to inline value
368 final long inlined = Inline.pack(value);
369 if(inlined != 0) return inlined;
370
371 // store text in heap file
372 final byte[] packed = Compress.pack(value);
373 final DataAccess store = text ? texts : values;
374 final long offset = store.length();
375 store.writeToken(offset, packed);
376 return packed == value ? offset : Compress.COMPRESS | offset;
377 }
378}

Callers 6

textMethod · 0.95
textItrMethod · 0.95
textDblMethod · 0.95
textLenMethod · 0.95
deleteMethod · 0.95
updateTextMethod · 0.95

Calls 4

packMethod · 0.95
packMethod · 0.95
lengthMethod · 0.95
writeTokenMethod · 0.95

Tested by

no test coverage detected