(int size)
| 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; |