Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
6bit-encoder
Advanced tools
Encodes 6bit numbers (0..63) to URL safe chars.
const assert = require('assert')
const { encode, encode5, decode, decode5 } = require('6bit-encoder')
assert.equal(encode(0b001111), 'F')
assert.equal(encode5(0b011111011111011111011111011111), 'VVVVV')
assert.equal(decode('F'), 0b001111)
assert.equal(decode5('VVVVV'), 0b011111011111011111011111011111)
npm install 6bit-encoder
Table of Contents generated with DocToc
A URL safe char that is not part of the encoding table and
can be used as a separator: '*'
Type: String
Remaining URL safe chars that are not part of the encoding table and
can be used as a separator: ; , . ~ ( ' ) ! * : @
Decodes one char into a 6 bit number
Parameters
s
String the char to decodeReturns Number a 6 bit number
Decodes two chars into a 12 bit number
Parameters
s
String the chars to decodeReturns Number a 12 bit number
Decodes three chars into an 18 bit number
Parameters
s
String the chars to decodeReturns Number an 18 bit number
Decodes four chars into an 24 bit number
Parameters
s
String the chars to decodeReturns Number a 24 bit number
Decodes five chars into an 30 bit number
Parameters
s
String the chars to decodeReturns Number a 30 bit number
Encodes a 6 bit number into a URL safe char
Parameters
n
Number a 6 bit numberReturns String the char
Encodes a 12 bit number into two URL safe chars
Parameters
n
Number a 12 bit numberReturns String the chars
Encodes a 18 bit number into three URL safe chars
Parameters
n
Number a 18 bit numberReturns String the chars
Encodes a 24 bit number into four URL safe chars
Parameters
n
Number a 24 bit numberReturns String the chars
Encodes a 30 bit number into five URL safe chars
Parameters
n
Number a 30 bit numberReturns String the chars
Get a decode function to decode n chars
Parameters
n
Number the number of chars to decodeReturns function the matching decoding function
Get an encode function to encode an n * 6
bit number
Parameters
n
Number number of 6 bits to encodeReturns function the matching encoding function
MIT
FAQs
Encodes 6bit numbers (0..63) to URL safe chars.
The npm package 6bit-encoder receives a total of 3 weekly downloads. As such, 6bit-encoder popularity was classified as not popular.
We found that 6bit-encoder 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.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.