tag:blogger.com,1999:blog-5246987755651065286.post7875219573451423741..comments2024-02-22T16:15:42.388-08:00Comments on cbloom rants: 04-30-13 - Packing Values in Bits - Flat Codescbloomhttp://www.blogger.com/profile/10714564834899413045noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5246987755651065286.post-6040293788308375072013-05-07T12:28:05.448-07:002013-05-07T12:28:05.448-07:00Yeah, that's a very useful general technique.
...Yeah, that's a very useful general technique.<br /><br />I used it in one of my LZ4 variants,<br />LZ4PLO-6*9*5 :<br /><br />http://cbloomrants.blogspot.com/2012/10/10-22-12-lz-bytewise-conclusions.html<br /><br />cbloomhttps://www.blogger.com/profile/10714564834899413045noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-66306408718936277952013-05-07T10:32:36.290-07:002013-05-07T10:32:36.290-07:00Taking your example, one could also note that 5 x ...Taking your example, one could also note that 5 x 5 = 125 ~ 128 => 7 bits, so it becomes possible to use 7 bits to store 2 values.<br /><br />Same for 3 :<br />3 x 3 x 3 = 27 ~ 32<br />or<br />3 x 3 x 3 x 3 x 3 = 243 ~ 256<br /><br />Obviously it's not generic, and most probably not always practical.<br /><br />Nonetheless, I think this method is used in some kind of texture compression format.<br />Cyanhttps://www.blogger.com/profile/02905407922640810117noreply@blogger.com