Automatically generated Node.js Foreign Function Interface (FFI) package for zlib
v1.2.11. It is meant as a base to build feature-rich packages on top of — without the hassle of writing library bindings and building native dependencies.
zlib
: A Massively Spiffy Yet Delicately Unobtrusive Compression Library (Also Free, Not to Mention Unencumbered by Patents)
linux-x86_64
Conan package id f2fe22dad08bad39aab2a38cb612e26da46e90c0
.
No library dependencies.
macos-armv8
Conan package id 30acef53c04f36d5f9412c84a1b3a7434a1f10fb
.
No library dependencies.
macos-x86_64
Conan package id ca6b19bf89270552244fca32806dded803132e76
.
No library dependencies.
windows-x86_64
Conan package id 995e0f0b86a651012a3bfca00d60f35ae037db5e
.
No library dependencies.
npm install --save github:node-ffi-libraries/node-ffi-library-zlib-v1.2.11#semver:^2.0.1
const { load } = require("@ffi-libraries/zlib-v1.2.11");
async function main() {
// Lazy-loading the library and all dependencies.
const library = await load();
// A library might have more than one header file.
console.dir(library);
// Lazy-load an individual header file (random example, see output from above).
const headerLoader = library.headers["./include/zlib.h"];
const header = await headerLoader();
// You can now use the functions and types exported by the header file.
console.dir(header);
// Properly unload when done.
await library.unload();
}
main();
- Used from Node.js (Javascript) to call the
zlib
dynamic library (C/C++).- No compilation required. All available binaries are included in the package and are loaded automatically.
- Library header files are included, but most other documentation is not. See instead documentation for
zlib
.
- The
header
variable in the above example contains a Javascript object generated from the C/C++ header file.- C/C++ constants.
- FFI typedefs.
- Bindings to C/C++ functions.
- See the Node.js FFI tutorial to get started.
- Using N-API (
-napi
) versions of FFI libraries is required. - See ffi-napi, ref-napi, and related
-napi
packages.
- Using N-API (
- Repository/package automatically generated by
@ffi-packager/ffi-packager
:- Version: v2.0.1
- Generator run by: Joel Purra
- Repository published to Github:
- Branch:
v2.0.1
- Repository:
node-ffi-library-zlib-v1.2.11
- Organization:
node-ffi-libraries
- Branch:
- Package was not published to NPM.
- Version:
2.0.1
(based on the package generator version) - Name:
@ffi-libraries/zlib-v1.2.11
- Organization/scope:
ffi-libraries
- Version:
- Library binaries made available by Conan.io:
- Package reference:
zlib/1.2.11@
- Conan remote:
conan-center
- Package reference:
- The library is
zlib
:- Version: v1.2.11
- Description: "A Massively Spiffy Yet Delicately Unobtrusive Compression Library (Also Free, Not to Mention Unencumbered by Patents)"
- License: Zlib
- Topics: zlib, compression
@ffi-libraries/zlib-v1.2.11 Copyright © 2021 Joel Purra. License: MIT.