GithubHelp home page GithubHelp logo

andarius / react-native-zstd Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 2.0 154.88 MB

ZSTD bindings for React Native

License: MIT License

CMake 2.87% C 0.39% C++ 16.24% Java 14.65% JavaScript 7.97% Ruby 13.54% TypeScript 9.65% Swift 0.21% Objective-C 9.57% Objective-C++ 15.76% Kotlin 9.15%

react-native-zstd's Introduction

react-native-zstd

ZSTD bindings for React-Native

Installation

npm install react-native-zstd

or

yarn add react-native-zstd

Usage

import { compress, decompress } from "react-native-zstd";
import { Buffer } from 'buffer';

// Compress
const compressionLevel: number = 3;
const compressed = compress("Hello World!", compressionLevel);
console.log(Buffer.from(compressed).toString('base64'))

// Decompress
const decompressed: string = decompress(compressed);
console.log(`decompressed: ${decompressed}`)

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

react-native-zstd's People

Contributors

andarius avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-native-zstd's Issues

Android build not working

Hello, thanks for creating this useful library.

The build does not seem to work for Android devices:

  CMake Error at CMakeLists.txt:14 (add_subdirectory):
    add_subdirectory given source "../externals/zstd/build/cmake" which is not
    an existing directory.

I believe this is due to including the directory here: https://github.com/Andarius/react-native-zstd/blob/main/android/CMakeLists.txt#L14
However this directory is not included in the package here: https://github.com/Andarius/react-native-zstd/blob/main/package.json#L17-L21

Let me know if this is an issue or if I've done something wrong

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.