Jump to content

Lossless Compression algorithm


Pryme8
 Share

Recommended Posts

I can not for the life of me remember what the algorithm is called and https://en.wikipedia.org/wiki/Lossless_compression has so many types not sure which is the one I was looking for.
What's the "best" method for compressing an array of any length with values between 0,255? 
I used one in the past and it had a look up table I think and was like an array with a bunch of other arrays inside of it.  It was a long time ago so sorry if this is not very descriptive.

End goal is after serialization of a ImageData.data into a smaller/stripped down array is to then hit it with a lossless compression algo before it exports so I can get the Image data I am saving even smaller.

Link to comment
Share on other sites

@Pryme8 Two easy methods for compressing files:

- you can use deflate on webserver: all files arrive with automatic gzip transfer encoding to the browser. just some  .htaccess settings on apache.
- jszip. Easy file access from a zip file. I'm already using this (in my engine I'm working on), not just compression but lower the number of http requests. https://stuk.github.io/jszip/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...