org.lwjgl.util.zstd.ZSTDAllocFunctionI 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 org.lwjgl.system.libffi.*;
import static org.lwjgl.system.APIUtil.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.libffi.LibFFI.*;
/**
* Instances of this interface may be passed to the {@link ZSTDCustomMem} struct.
*
* Type
*
*
* void * (*{@link #invoke}) (
* void *opaque,
* size_t size
* )
*/
@FunctionalInterface
@NativeType("ZSTD_allocFunction")
public interface ZSTDAllocFunctionI extends CallbackI {
FFICIF CIF = apiCreateCIF(
FFI_DEFAULT_ABI,
ffi_type_pointer,
ffi_type_pointer, ffi_type_pointer
);
@Override
default FFICIF getCallInterface() { return CIF; }
@Override
default void callback(long ret, long args) {
long __result = invoke(
memGetAddress(memGetAddress(args)),
memGetAddress(memGetAddress(args + POINTER_SIZE))
);
apiClosureRetP(ret, __result);
}
@NativeType("void *") long invoke(@NativeType("void *") long opaque, @NativeType("size_t") long size);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy