Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/7c/minilzo
minilzo deno bindings
https://github.com/7c/minilzo
Last synced: about 1 month ago
JSON representation
minilzo deno bindings
- Host: GitHub
- URL: https://github.com/7c/minilzo
- Owner: 7c
- License: other
- Created: 2024-10-21T21:56:00.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-23T09:57:20.000Z (2 months ago)
- Last Synced: 2024-10-23T21:31:10.503Z (about 2 months ago)
- Language: C
- Size: 89.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## minilzo for deno ffi
- compatible with deno2
- uses minilzo 2.10 from http://www.oberhumer.com/opensource/lzo/## Usage
see the [demo](./demo.ts) file## Building
since minilzo is a C library, we need to build it for each architecture. Most of end-consumers do not want to build it, thats why this library has pre-built binaries for Linux, MacOS (arm64). I suggest you to compile it on your own anyways, not to trust pre-built binaries generally.### Linux arm64, armv7l, x86_64
this will build the minilzo library for each architecture and copy it to the bin/ folder. You will need docker installed.
```
docker build -t minilzo-builder .
docker run --rm -v $(pwd)/bin:/output minilzo-builder
```
### MacOS(arm64, x86_64), Windows(x86_64)
Native Makefile detects the architecture and available compiler and builds the library. Makefile supports gcc and clang compilers. Make sure you have the necessary compilers installed.
```
make
```### Precompiled binaries
you can download precompiled binaries from [./bin folder](https://github.com/7c/minilzo/tree/main/bin). Create a new folder and wget/curl the binaries into the folder. and use libName() function to get the correct library name. Use with caution. I am putting them here for myself as cheatsheet, you should be compiling them yourself.
```
test -e ./bin || mkdir ./bin
## MacOS Arm64
wget https://github.com/7c/minilzo/raw/refs/heads/main/bin/minilzo-arm64.dylib -O ./bin/minilzo-arm64.dylib
## MacOS x86_64
...coming soon....
## Linux Arm64
wget https://github.com/7c/minilzo/raw/refs/heads/main/bin/minilzo-arm64.so -O ./bin/minilzo-arm64.so
## Linux Armv7l
wget https://github.com/7c/minilzo/raw/refs/heads/main/bin/minilzo-armv7l.so -O ./bin/minilzo-armv7l.so
## Linux x86_64
wget https://github.com/7c/minilzo/raw/refs/heads/main/bin/minilzo-x86_64.so -O ./bin/minilzo-x86_64.so
## Windows x86_64
...coming soon....
## Windows Arm64
...coming soon....
```## Install
### JSR
```
import { Minilzo, libName } from "jsr:@7c/minilzo"
```## Copyright
```
============================================================================
miniLZO -- mini subset of the LZO real-time data compression library
============================================================================Author : Markus Franz Xaver Johannes Oberhumer
http://www.oberhumer.com/opensource/lzo/
Version : 2.10
Date : 01 Mar 2017
LZO and miniLZO are Copyright (C) 1996-2017 Markus Franz Xaver Oberhumer
All Rights Reserved.LZO and miniLZO are distributed under the terms of the GNU General
Public License (GPL). See the file COPYING.Special licenses for commercial and other applications which
are not willing to accept the GNU General Public License
are available by contacting the author.```