![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.
@aspiesoft/cwsclib
Advanced tools
A compression library for strings, that recognizes common words, and creates references to them.
A compression library for strings, that recognizes common words, and creates references to them. Because these word references are built within the cdn, they should get cached and reduce the amount of data sent to the client.
This algorithm checks if the string got smaller or larger at each step, and does Not add methods that become larger than the original result from the last method. The algorithm attempts to reduce repeating words, and generate utf8 character based references to allow fast decompression.
Usually decompression is faster than compression, as compression should make the string as small as possible, and decompression is usually when you actually need the string.
npm install @aspiesoft/cwsclib
# or with no optional dependencies
npm install @aspiesoft/cwsclib --no-optional
<!-- Optional: add secondary compression (will detect automatically) -->
<script src="https://cdn.jsdelivr.net/gh/nodeca/pako@1.0.11/dist/pako.min.js" charset="utf-8"></script>
<!-- Note: charset="utf-8" is necessary for the script to use utf-8 character references properly -->
<script src="https://cdn.jsdelivr.net/gh/AspieSoft/cwscLib@1/script.min.js" charset="utf-8"></script>
// require only if using node.js
const cwscLib = require('@aspiesoft/cwsclib');
let str = 'the cdn.jsdelivr.net javascript engine built in year 2020 by aspiesoft';
let compressed = cwscLib.compress(str, 9).toString(); // output: §1:0><qU> <&> <*b> <NŒ> <Xx> in <l‰> 2020 by <-2>
let decompressed = cwscLib.decompress(compressed); // output: the cdn.jsdelivr.net javascript engine built in year 2020 by aspiesoft
// note: the compressed string may appear different, if you add an optional compression after this compression (depending on if it gets smaller)
let speed = 1; // any number between 0 and 9
/*
speed = 1 (fastest)
speed = 9 (best) (default)
*/
let compression = cwscLib.compress(str, speed);
/*
output: {
comp: '0><qU> <&> <*b> <NŒ> <Xx> in <l‰> 2020 by <-2>',
ver: 1,
compType: 0,
toString: [Function: toString],
toJSON: [Function: toJSON],
decomp: [Function: decomp]
}
*/
compression.toJSON(); // output: compression object without functions (useful for storing json)
compression.decomp(); // output: original string
cwscLib.decompress(compression); // output: original string
cwscLib.decompress(compression.toJSON()); // output: original string
cwscLib.compress('11111 222 33 4444444 5555555555 6 7 888888888888 999999999999').toString(); // output: §1:1>2:1 0:2 33 4:4 7:5 6 7 9:8 9:9
FAQs
A compression library for strings, that recognizes common words, and creates references to them.
We found that @aspiesoft/cwsclib 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.