
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
react-native-tiny-wavpack-decoder
Advanced tools
A lightweight React Native Turbo Module for decoding WavPack audio files to WAV format on iOS and Android. Built with the New Architecture for optimal performance. This module also supports progress updates during decoding.
Install the package:
Using yarn:
yarn add react-native-tiny-wavpack-decoder
using npm:
npm install react-native-tiny-wavpack-decoder
Link native dependencies:
cd ios && pod install
Enable New Architecture (if not already enabled):
ios/Podfile, ensure:
use_react_native!(
:path => '../node_modules/react-native',
:new_architecture => true
)
android/app/build.gradle, enable Turbo Modules:
newArchEnabled=true
Rebuild the app:
npx react-native run-ios
# or
npx react-native run-android
Decode a WavPack file to WAV using the decode method. The module requires file paths accessible by the app (e.g., in the document directory).
import TinyWavPackDecoder from 'react-native-tiny-wavpack-decoder';
import * as RNFS from '@dr.pogodin/react-native-fs';
const decodeWavPack = async () => {
const inputPath = `${RNFS.DocumentDirectoryPath}/sample.wv`; // Ensure file exists
const outputPath = `${RNFS.DocumentDirectoryPath}/output.wav`;
try {
const result = await TinyWavPackDecoder.decode(inputPath, outputPath, {
maxSamples: -1, // Decode all samples
bitsPerSample: 16, // Output bit depth (8, 16, 24, or 32)
});
console.log('Decode result:', result); // "Success"
} catch (error) {
console.error('Decode error:', error.message);
}
};
Subscribe to decoding progress events (0.0 to 1.0) using addProgressListener.
import { useEffect } from 'react';
import TinyWavPackDecoder from 'react-native-tiny-wavpack-decoder';
const App = () => {
useEffect(() => {
const subscription = TinyWavPackDecoder.addProgressListener((progress) => {
console.log(`Progress: ${(progress * 100).toFixed(2)}%`);
});
return () => {
subscription.remove();
};
}, []);
// Trigger decodeWavPack() as shown above
};
The decode method accepts an options object with the following properties:
| Option | Type | Default | Description |
|---|---|---|---|
maxSamples | number | -1 | Maximum number of samples to decode. Use -1 for all samples. |
bitsPerSample | `8 | 16 | 24 |
The example/ directory contains a sample app demonstrating decoding and progress updates. To run it:
cd example
npm install
npm run ios
# or
npm run android
Place a sample.wv file in the app’s document directory (e.g., via RNFS.DocumentDirectoryPath).
@dr.pogodin/react-native-fs to manage files.FILE* in the C code, which may cause crashes if multiple decoding operations are triggered concurrently. A thread-safe version is planned (see [issue #TBD]).Contributions are welcome! Please open an issue or pull request on the GitHub repository for bugs, features, or improvements.
MIT License. See LICENSE for details.
FAQs
Tiny WavPack Decoder for React Native
The npm package react-native-tiny-wavpack-decoder receives a total of 133 weekly downloads. As such, react-native-tiny-wavpack-decoder popularity was classified as not popular.
We found that react-native-tiny-wavpack-decoder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.