
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
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 1 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
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.