{"action":"created","issue":{"url":"https://api.github.com/repos/google/brotli/issues/165","labels_url":"https://api.github.com/repos/google/brotli/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/google/brotli/issues/165/comments","events_url":"https://api.github.com/repos/google/brotli/issues/165/events","html_url":"https://github.com/google/brotli/issues/165","id":107910290,"number":165,"title":"Very poor compression ratio on TriMesh binary streams compared to LZMA","user":{"login":"bhouston","id":588541,"avatar_url":"https://avatars.githubusercontent.com/u/588541?v=3","gravatar_id":"","url":"https://api.github.com/users/bhouston","html_url":"https://github.com/bhouston","followers_url":"https://api.github.com/users/bhouston/followers","following_url":"https://api.github.com/users/bhouston/following{/other_user}","gists_url":"https://api.github.com/users/bhouston/gists{/gist_id}","starred_url":"https://api.github.com/users/bhouston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhouston/subscriptions","organizations_url":"https://api.github.com/users/bhouston/orgs","repos_url":"https://api.github.com/users/bhouston/repos","events_url":"https://api.github.com/users/bhouston/events{/privacy}","received_events_url":"https://api.github.com/users/bhouston/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-23T12:38:24Z","updated_at":"2015-09-23T16:32:43Z","closed_at":null,"body":"I've long been a promonent of integrating LZMA2/LZMA into the browsers because of its incredible effectiveness for compressing binary data streams.  When I saw Brotli I thought that this was likely going to be just as good.  It isn't actually great.\r\n\r\nI am a frequent contributor to both http://ThreeJS.org as well as the http://Clara.io online 3D editor.  One of the biggest issues we run into is the size of mesh downloads.  Right now we are using LZMA.js scripts to do the decompression in worker threads, but this isn't optimal, especially on mobile.\r\n\r\nFor example, this real-world large-ish binary trimesh stream, very typical:\r\n\r\nhttps://d3ijcvgxwtkjmf.cloudfront.net/a4c3c7313b7bdeb68ad46a7e1b761f38z?filename=object-53-batman-tumbler-lw8-12.bingeom\r\n\r\nThe original size once downloaded is 6,779,000 bytes (be careful, this stream may be delivered with \"Content-Encoding: gzip\".)\r\n\r\nHere are the compression results:\r\n\r\n* LZMA\r\n  * Normal: 921,600 bytes\r\n  * Ultra: 920,147 bytes\r\n* GZip\r\n  * Normal: 2,296,362 bytes\r\n  * Ultra: 2,258,967 bytes\r\n* Brotli\r\n  * Normal and Ultra: 1,513,459 bytes.  [(source)](https://news.ycombinator.com/item?id=10258109)\r\n\r\nBrotli is significantly less effective that LZMA in this case -- not just a little but by a huge margin.\r\n\r\nWhat this means is that we can not replace our LZMA.js scripts with Brotli support.  This is pretty bad for us in the 3D community as we are still stuck with JavaScript-based decompression."},"comment":{"url":"https://api.github.com/repos/google/brotli/issues/comments/142655673","html_url":"https://github.com/google/brotli/issues/165#issuecomment-142655673","issue_url":"https://api.github.com/repos/google/brotli/issues/165","id":142655673,"user":{"login":"jeroenooms","id":216319,"avatar_url":"https://avatars.githubusercontent.com/u/216319?v=3","gravatar_id":"","url":"https://api.github.com/users/jeroenooms","html_url":"https://github.com/jeroenooms","followers_url":"https://api.github.com/users/jeroenooms/followers","following_url":"https://api.github.com/users/jeroenooms/following{/other_user}","gists_url":"https://api.github.com/users/jeroenooms/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroenooms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroenooms/subscriptions","organizations_url":"https://api.github.com/users/jeroenooms/orgs","repos_url":"https://api.github.com/users/jeroenooms/repos","events_url":"https://api.github.com/users/jeroenooms/events{/privacy}","received_events_url":"https://api.github.com/users/jeroenooms/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T16:32:43Z","updated_at":"2015-09-23T16:32:43Z","body":"Perhaps their main selling point is that decompression is faster than for lzma, to make things easier on the client. But I agree that the difference in compression ratio very big, given the proposal states that:\r\n\r\n>  This specification defines a lossless compressed data format that compresses data using a combination of the LZ77 algorithm and Huffman coding, with efficiency comparable to the best currently available general-purpose compression methods."}}