
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
dictionary-encoding
Advanced tools
Simple binary dictionary compression scheme. It takes a dictionary whose ids are integers, and a string or array of strings to compress according to the dictionary provided. Decomposing strings into parts that may be represented by the dictionary is left to a higher order module which would use this one to manage efficient encoding.
const encode = require('dictionary-encoding').encode
const decode = require('dictionary-encoding').decode
const dictionary = {
'hello': '1',
'world': '2',
'ya\'ll': '3',
',': '4'
}
const invertedDictionary = {
'1': 'hello',
'2': 'world',
'3': 'ya\'ll',
'4': ','
}
encode(dictionary, ['hello', 'world', ',', 'ya\'ll'], function (err, buffer) {
decode(invertedDictionary, buffer, function (err, arr) {
console.log(arr) // ['hello', 'world', ',', 'ya\'ll']
})
})
encode(dictionary, data, [cb]) Encode takes a dictionary and swaps each item with the value stored under the dictionary key. This function either returns a length prefixed stream of VLQ encoded buffers, or takes a callback which is provided a concatenation of the buffers that would otherwise be streamed.
decode(dictionary, data, [cb]) Encode takes a dictionary and swaps each item with the value stored under the dictionary key. This function either returns an object stream of strings, or takes a callback which is provided an array of the strings that would otherwise be streamed.
$ npm install dictionary-encoding
FAQs
Simple binary dictionary compression scheme
We found that dictionary-encoding 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.