Skip to content

Releases: craftzdog/react-native-quick-base64

v3.0.1

Choose a tag to compare

@craftzdog craftzdog released this 08 Jul 00:36

Fixes

  • android: commit codegen output so source builds work
  • example: add base64 gem so CocoaPods installs on Ruby 3.4

Docs

  • Note New Architecture requirement for 3.0.0+

Other

  • ci: use version tags instead of commit SHAs for actions

v3.0.0

Choose a tag to compare

@craftzdog craftzdog released this 08 May 12:17

This is a major release focused on performance and modernization. The base64 codec has been replaced with SIMD-accelerated simdutf, the native module fully migrated to React Native's TurboModule codegen, and several JSI-boundary copies eliminated.

⚠️ Breaking changes

  • atob / btoa global shims are dropped. Previous versions installed these globals as a side effect of importing the package. They are no longer registered. Hermes ships native atob / btoa, so this is a no-op on Hermes; apps still on JSC (which has no DOM globals) need to provide their own polyfill.
  • TurboModule codegen migration. The native module is now defined via codegen and requires the New Architecture. There is no Old-Arch fallback.

The public JS API (toByteArray, fromByteArray) is unchanged.

🚀 Performance

  • simdutf codec. toByteArray / fromByteArray now use simdutf's SIMD-accelerated base64 encode/decode. Significant speedups across all platforms vs. base64-js; see the example app's Benchmarks screen.
  • No memcpy on decode at the JSI boundary. The decoded bytes are handed to JSI as an ArrayBuffer backed by an owning MutableBuffer, eliminating one full-size copy on the hot path.
  • No UTF-16→UTF-8 re-encoding on decode. Replaced jsi::String::utf8(rt) with getStringData, which exposes Hermes's internal storage directly. Base64 input is ASCII, so this is a near-zero-overhead append on the fast path.

📈 Benchmarks

It is now 2-3x faster than v2.x, which performs as fast as Hermes's built-in atob and btoa string-only functions.

benchmark

🛠 Other

  • CI cleanup (removed legacy web workflow / branch conditions).
  • Bundler / Ruby toolchain bump.

🙏 Credits

Kudos to @GrzywN 🙌

Full Changelog: v2.2.2...v3.0.0

v2.2.2

Choose a tag to compare

@craftzdog craftzdog released this 30 Sep 11:31
  • fix(android): 16kb support 62ba071

v2.2.1

Choose a tag to compare

@craftzdog craftzdog released this 22 Jul 07:12
  • fix: base64 encode sometime use "urlsafe" charset causing issue #45

v2.2.0

Choose a tag to compare

@craftzdog craftzdog released this 28 May 06:43
  • refactor: New Arch, 0.78+ support, actually uses the native implementation, removed the JS fallback #46 by @hirbod

Synchronous native install
Native JSI bindings are now initialized via a clean install() method. No more flaky setBridge() hacks or crashes during early runtime.

Installs once at startup
The module checks typeof global.base64FromArrayBuffer to guard the install. No double-installs or race conditions.

Dropped the base64-js fallback
If native fails, it fails loudly. No silent fallback to slower JS versions. As we install synchronously, this should never happen (PR #24 wasn't a good merge, it made the while install unpredictable and almost always fallback to the JS-version on the first call, depending how'd re-request for your whole session)

Removed redundant typeof checks
Helper functions no longer re-check availability on every call.

Cleaned up type assertions
No more ! or as — safer and easier to follow.

btoa and atob are now considered legacy
Hermes supports them natively. They’re still there for compatibility but not recommended for new code.

Podspec is now plug-and-play
Works with both old and new architecture. No manual tweaks needed.

v2.1.1

Choose a tag to compare

@craftzdog craftzdog released this 11 Apr 05:03
  • Fix: build on React Native 0.74 #36
  • Expose urlSafe flag for encoding, removeLinebreaks for decoding #37

v2.1.0

Choose a tag to compare

@craftzdog craftzdog released this 02 Apr 05:23

There are a few bug fixes/improvements in Kevin Heifner's fork of cpp-base64.
This release bumps up from 2.rc.7 to 2.rc.09 from the fork with the following changes:

  • A bug fix allowing for unpadded strings
  • Modified to be header-only
  • Templated for various string / char containers
  • Performance improvements (decoding via lookup table)
    • speed improvements measured at 4x-6x over v2.0.8

Thanks @boorad for the contribution #32