
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
arithmetic-coding
Advanced tools
Install as module for API usage:
npm i arithmetic-coding
Or install as global CLI:
npm i -g arithmetic-coding
From file path:
const ariCoding = require('arithmetic-coding');
// Encode from file
ariCoding.encode(path.resolve('/txt/long.txt'), path.resolve('/txt/long-encoded.txt'));
// Decode from file
ariCoding.decode(path.resolve('/txt/long-encoded.txt'), path.resolve('/txt/long-decoded.txt'));
From Buffer:
let data = Buffer.from('Example data', 'utf8');
// Encode from Buffer
let encoded = encode.encodeFromBuffer(data);
console.log(`encoded = ${encoded}`);
// Decode from Buffer
let decoded = decode.decodeFromBuffer(encoded);
console.log(`decoded = ${decoded}`);
$ ari-coding -h
Usage: index [options] [command]
Options:
-v, --version output the version number
-h, --help output usage information
Commands:
encode|e [options] <file> encode a file
decode|d [options] <file> decode a file
$ ari-coding encode -h
Usage: encode|e [options] <file>
encode a file
Options:
-o, --output <file> output file path
-h, --help output usage information
You can see the latest travis test for running time used by each test.
Some benchmarks are shown below:
| File size (Bytes) | total time | encode time | decode time |
|---|---|---|---|
| 60640 | 110ms | small | 110ms |
| 2130640 | 2940ms | 426ms | 2514ms |
FAQs
Arithmetic coding implementation
The npm package arithmetic-coding receives a total of 10 weekly downloads. As such, arithmetic-coding popularity was classified as not popular.
We found that arithmetic-coding demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Research
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.