0.1.12 • Published 24 days ago

react-native-fast-encoder v0.1.12

Weekly downloads
-
License
MIT
Repository
github
Last release
24 days ago

React-native-fast-encoder

Key Features:

  • Based on: react-native-fast-openpgp for initial groundwork.
  • Leverages JSI: Utilizes JSI (JavaScript Interface) to perform text encoding functions on the native side (Golang)
  • Encoding: Only supports UTF-8 for now.

Usage:

npm i react-native-fast-encoder
const TextEncoder = require('react-native-fast-encoder');
window.TextEncoder = TextEncoder;
window.TextDecoder = TextEncoder;
  1. Now, you can use the standard TextEncoder and TextDecoder APIs for your text encoding/decoding operations, and the library will automatically utilize the efficient native implementations.

Benchmark Results (React Native with Hermes engine):

Tasktext-encoding (ms)react-native-fast-encoder (ms)Performance Improvement
Encode 100kb string220373x faster
Encode 100 * 100kb strings18,000100180x faster
Encode 10k small strings210504.2x faster
Decode 100kb string1801180x faster
Decode 100 * 100kb strings17,00025680x faster
Decode 10k small strings160453.5x faster

Performance Expectations:

You can expect significant performance improvements (4x to 100x) compared to the 'text-encoding' library, especially when dealing with large strings. This gain results from utilizing the more efficient native implementations through JSI.

Note:

This information is based on the given data and might not represent the actual library's functionality or source code. Please refer to the actual library documentation for specific usage instructions and limitations.

0.1.12

24 days ago

0.1.10

25 days ago

0.1.11

25 days ago

0.1.9-arm

27 days ago

0.1.8

28 days ago

0.1.7

28 days ago

0.1.9

28 days ago

0.1.6

28 days ago

0.1.5

3 months ago

0.1.4

3 months ago

0.1.3

3 months ago

0.1.2

3 months ago

0.1.1

3 months ago

0.1.0

3 months ago