![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Simple utility to manage base85. Where base64 adds approximately 1/3, base85 only adds about 1/4. Of course there's a tradeoff. The Base85 alphabet includes characters that might not be as friendly as the base64 alphabet. While it's still only printable characters (ASCII 33 '!' to ASCII 117 'u'), it contains quotes, both ' and " and other characters which might appear problematic in some applications.
npm install base85
For encoding:
var base85 = require('base85');
console.log(base85.encode('Hello, world!'));
Output: <~87cURD_*#TDfTZ)+T~>
For decoding:
var base85 = require('base85');
var decoded = base85.decode('<~@;Ka&GAhM;+CT.u+Du*?E,8s.+DkP&ATJu/@:O\'q@3B*\'Cht5\'Dg;~>');
console.log(decoded.toString('ascii'));
Output: all work and no play makes jack a dull boy
Doesn't support the z-abbreviation as for now.
encode(data)
Encodes the specified data. The encoded data will be prepended with
<~
and appended with~>
. This is actually following Adobes version which seems to be the common practice for base85.data The data to encode, may be a
String
or a Buffer.returns A
String
with the encoded data.
decode(data)
Decodes the specified data. The data is expected to start with
<~
and and end with~>
. No checks are actually made for this, but output will be unexpected if this is not the case.A buffer is always returned as data may not be representable in a string. If you know it is, you can easily convert it to a string using the Buffer.toString() utility.
data The data to decode. May be a
String
or a Buffer. Expected to be enclosed in<~
and~>
.returns A Buffer With the decoded data.
FAQs
Base85 (Ascii85) encode and decode functionality
The npm package base85 receives a total of 1,838 weekly downloads. As such, base85 popularity was classified as popular.
We found that base85 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.