org.lwjgl.util.zstd.LibZstd Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lwjgl-zstd Show documentation
Show all versions of lwjgl-zstd Show documentation
A fast lossless compression algorithm, targeting real-time compression scenarios at zlib-level and better compression ratios.
The newest version!
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.util.zstd;
import org.lwjgl.system.*;
import static org.lwjgl.system.MemoryUtil.*;
/** Initializes the zstd shared library. */
final class LibZstd {
static {
String libName = Platform.mapLibraryNameBundled("lwjgl_zstd");
Library.loadSystem(System::load, System::loadLibrary, LibZstd.class, "org.lwjgl.zstd", libName);
MemoryAllocator allocator = getAllocator(Configuration.DEBUG_MEMORY_ALLOCATOR_INTERNAL.get(true));
setupMalloc(
allocator.getMalloc(),
allocator.getCalloc(),
allocator.getRealloc(),
allocator.getFree(),
allocator.getAlignedAlloc(),
allocator.getAlignedFree()
);
}
private LibZstd() {
}
static void initialize() {
// intentionally empty to trigger static initializer
}
private static native void setupMalloc(
long malloc,
long calloc,
long realloc,
long free,
long aligned_alloc,
long aligned_free
);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy