MCPcopy Create free account
hub / github.com/apache/orc / getBuffer

Method getBuffer

java/core/src/java/org/apache/orc/impl/ZstdCodec.java:49–56  ·  view source on GitHub ↗
(int size)

Source from the content-addressed store, hash-verified

47 ThreadLocal.withInitial(() -> null);
48
49 protected static byte[] getBuffer(int size) {
50 byte[] result = threadBuffer.get();
51 if (result == null || result.length < size || result.length > size * 2) {
52 result = new byte[size];
53 threadBuffer.set(result);
54 }
55 return result;
56 }
57
58 static class ZstdOptions implements Options {
59 private int level;

Callers 1

compressMethod · 0.95

Calls 2

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected