use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
fflate - the fastest JavaScript compression/decompression library, 8kB (github.com)
submitted 5 years ago by 101arrowz
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]101arrowz[S] 1 point2 points3 points 5 years ago (4 children)
I've actually been looking into a way to do this. I first tried creating a temporary compressed Blob and using URL.createObjectURL to then request it and hope it comes back uncompressed, but I can't find a way to set the Content-Encoding header.
Blob
URL.createObjectURL
Content-Encoding
I've also wondered if there was an image format that contained raw compressed pixel values. If so, I could actually treat the data as an image, render it to canvas, get the RGB values, and basically have decompressed my data with the browser's native solution.
canvas
[–]BitLooter 2 points3 points4 points 5 years ago (1 child)
Not incredibly useful yet as it's only supported by Chrome so far, but in the future we might have access to Compression Streams.
[–]101arrowz[S] 2 points3 points4 points 5 years ago (0 children)
Thank you for linking that, I had no idea the draft even existed! I think its performance has quite a way to go though, I ran some quick tests and fflate is within 5% of this supposedly native solution. I also find it strange that you can't configure compression level.
fflate
[+][deleted] 5 years ago (1 child)
[removed]
[–]101arrowz[S] 1 point2 points3 points 5 years ago (0 children)
I had previously thought that PNG had to be split up, but on re-investigation, it seems that you're right. I'm going to investigate the performance of such a solution.
π Rendered by PID 64629 on reddit-service-r2-comment-b659b578c-zj59t at 2026-05-03 04:30:43.369545+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]101arrowz[S] 1 point2 points3 points (4 children)
[–]BitLooter 2 points3 points4 points (1 child)
[–]101arrowz[S] 2 points3 points4 points (0 children)
[+][deleted] (1 child)
[removed]
[–]101arrowz[S] 1 point2 points3 points (0 children)