<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: palaiologos</title><link>https://news.ycombinator.com/user?id=palaiologos</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sun, 06 Sep 2026 11:05:37 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=palaiologos" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[Balrogg: Demonically compacting (up to 15%) lossless Vorbis/Opus recompressor]]></title><description><![CDATA[
<p>Article URL: <a href="https://github.com/iczelia/balrogg">https://github.com/iczelia/balrogg</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=49549778">https://news.ycombinator.com/item?id=49549778</a></p>
<p>Points: 88</p>
<p># Comments: 11</p>
]]></description><pubDate>Thu, 03 Sep 2026 13:37:22 +0000</pubDate><link>https://github.com/iczelia/balrogg</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=49549778</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49549778</guid></item><item><title><![CDATA[New comment by palaiologos in "Bzip3: A spiritual successor to BZip2"]]></title><description><![CDATA[
<p>Hi, tool author here.<p>Huffman coding is a static minimum-redundancy code. What this means is that it finds an optimal assignment of bit sequences to letters in the input alphabet (commonly US-ASCII or extensions). This however means that Huffman coding can not exploit redundancies that stem from the concrete sequence of characters. For example, you could easily predict that an `e` comes after `Th`, but Huffman coding can not know that.<p>Hence after applying the Burrows-Wheeler transform you need to have some sort of a higher-order transform (i.e. a transform that considers more than just individual bytes) which somehow reaps from the changed distribution of the result of the algorithm. But we will get to that in a second.<p>The joke here is that the Burrows-Wheeler transform is closely related to suffix trees and suffix arrays, which are often used in bioinformatics and HPC for full-text search. If you wanted to find a pattern of length `p` in a text of length `n`, if you already have a suffix tree of the original text, the search is linear in the length /of the pattern/ - i.e. O(p). The suffix tree stores all suffixes of a string in a compressed manner (i.e. it has a linear space overhead, approximately O(20n) as given by Gusfield, D. (1997). Algorithms on Strings, Trees and Sequences: Computer Science and Computational Biology. Cambridge University Press), so you can search for a word in it by simply traversing from the root node to an internal or leaf node by following a sequence of bytes that comprise the word.<p>As such, a suffix tree (and equivalently suffix array and the BWT, which is trivially computed from a suffix array) form something which can be thought of as a static PPM model. Notably real world implementations of PPM use suffix trees as a part of their main storage data structure (e.g. PPMd). What this all means is that given a suffix tree, we can very cheaply give the probability distribution for the next byte that follows a given fixed-order sequence of bytes. This is nice, because then e.g. an order-2 predictor would be able to tell that `Th` is followed by `e` once enough data has been gathered.<p>As you can probably guess, the more preceding bytes you know, the better will be your estimate for what is the most likely next byte. But the larger your context, the more expensive the searches and computations become due to pointer chasing in the suffix tree.<p>So how do we remedy this? We notice that the Burrows-Wheeler transform essentially clusters similar contexts together, meaning that a low order predictor (= faster, simpler) on BWT compresses as well as a high order predictor (= slow, complicated) on the original data, at the cost of an extra transformation. This is viable, because the Burrows-Wheeler transform can be quickly computed and there have been recent advancements in running it on the GPU. So what this means is that bzip3 uses BWT + a low order predictor with an arithmetic coder to encode the bytes, meaning that it can make use of high order statistics for compression and performs comparably at a faster speed.</p>
]]></description><pubDate>Sat, 01 Feb 2025 21:13:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=42902407</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=42902407</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42902407</guid></item><item><title><![CDATA[New comment by palaiologos in "Bzip3: A spiritual successor to BZip2"]]></title><description><![CDATA[
<p>Hi, tool author here!<p>Thank you for your benchmark!<p>As you may be aware, different compression tools fill in different data type niches. In particular, less specialised statistical methods (bzip2, bzip3, PPMd) generally perform poorly on vaguely defined binary data due to unnatural distribution of the underlying data that at least in bzip3's case does not lend well to suffix sorting.<p>Conversely, Lempel-Ziv methods usually perform suboptimally on vaguely defined "textual data" due to the fact that the future stages of compression that involve entropy coding can not make good use of the information encoded by match offsets while maintaining fast decompression performance - it's a long story that I could definitely go into detail about if you'd like, but I want to keep this reply short.<p>All things considered, data compression is more of an art than science, trying to fit in an acceptable spot on the time to compression ratio curve. I created bzip2 as an improvement to the original algorithm, hoping that we can replace some uses of it with a more modern and worthwhile technology as of 2022. I have included benchmarks against LZMA, zstandard, etc. mostly as a formality; in reality if you were to choose a compression method it'd be very dependent on what exactly you're trying to compress, but my personal stance is that bzip3 would likely be strictly better than bzip2 in all of them.<p>bzip3 usually operates on bigger block sizes, up to 16 times bigger than bzip2. additionally, bzip3 supports parallel compression/decompression out of the box. for fairness, the benchmarks have been performed using single thread mode, but they aren't quite as fair towards bzip3 itself, as it uses a way bigger block size. what bzip3 aims to be is a replacement for bzip2 on modern hardware. what used to not be viable decades ago (arithmetic coding, context mixing, SAIS algorithms for BWT construction) became viable nowadays, as CPU Frequencies don't tend to change, while cache and RAM keep getting bigger and faster.</p>
]]></description><pubDate>Sat, 01 Feb 2025 20:59:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=42902241</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=42902241</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42902241</guid></item><item><title><![CDATA[New comment by palaiologos in "Bzip3: A spiritual successor to BZip2"]]></title><description><![CDATA[
<p>Hi, tool author here!<p>Regarding your first remark: high ratio data compression has its time and place, and I personally understand that to many people it is not very desirable. In a lot of scenarios something as plain and simple as LZ4 generally suffices.<p>On the other hand, there is an unofficial (= unsupported) port of bzip3 to older (386+) machines that run MS-DOS6.22. I have prepared it for a retrocomputing meeting in Ontario that I attended a while back. Let me know what you think :).<p><a href="https://github.com/kspalaiologos/dev-urandom/blob/main/dos/BZIP3.EXE">https://github.com/kspalaiologos/dev-urandom/blob/main/dos/B...</a></p>
]]></description><pubDate>Sat, 01 Feb 2025 20:51:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=42902144</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=42902144</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42902144</guid></item><item><title><![CDATA[New comment by palaiologos in "Bzip3: A spiritual successor to BZip2"]]></title><description><![CDATA[
<p>Hi! Tool author here.<p>Almost every single open source compression tool contains a clause like this. For example, the one in the README that you see has been directly lifted from the bzip2 README. Almost all open source projects come with such a no-warranty scheme. 7-Zip, zstandard, xz-utils, etc; as exemplified by a quote from the license text of the MIT license:<p>> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.<p>If you were willing to sign a commercial support contract with me on terms that we negotiated, I would be willing to provide you warranty.<p>If you were not aware, this is essentially the business model of WinRAR. The reason why tools like 7-Zip are not used by the public sector or companies (at least here) is that they provide no warranty in case of data loss. However, if you actually buy WinRAR, then you can hold them liable for damage to your archives. The "infinite 40 day trial" of WinRAR does not entitle you to compensation for damages and thus corporate entities and public entities have to buy WinRAR licenses. WinRAR has never cared about personal customers.<p>In general, having to cope with mild reliability of software is what you have to live with - you already get more than you paid for. Not to say that my tool is unreliable - I put a lot of effort into it, but it would put you in bad light to complain about something that you generously received for free :).</p>
]]></description><pubDate>Sat, 01 Feb 2025 20:43:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=42902059</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=42902059</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42902059</guid></item><item><title><![CDATA[New comment by palaiologos in "Neuralink Compression Challenge"]]></title><description><![CDATA[
<p>they're looking for a compressor that can do more than 200MB/s on a 10mW machine (that's including radio, so it has to run on a CPU clocked like original 8086) and yield 200x size improvement. speaking from the perspective of a data compression person, this is completely unrealistic. the best statistical models that i have on hand yield ~7x compression ratio after some tweaking, but they won't run under these constraints.</p>
]]></description><pubDate>Fri, 24 May 2024 12:07:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=40465319</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=40465319</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40465319</guid></item><item><title><![CDATA[New comment by palaiologos in "A lightweight Lisp interpreter in Malbolge"]]></title><description><![CDATA[
<p>Yeah, I can kind of relate, actually! Now I am 19, have a job and attend a somewhat demanding university, outside of (more useful?) real world research I am currently doing. I wrote the code when i was c.a. 15 - 16, I could definitely improve upon my Lisp - it's within my range of current capabilities, but I would not have the motivation to :-).</p>
]]></description><pubDate>Wed, 03 Jan 2024 21:12:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=38860004</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=38860004</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38860004</guid></item><item><title><![CDATA[New comment by palaiologos in "A lightweight Lisp interpreter in Malbolge"]]></title><description><![CDATA[
<p>Thank you for the kind comments! Unfortunately, the BLC interpreter is much slower than MalbolgeLISP, even when using fast20 (with a lot of optimisations coined by dzaima). My memory is a bit hazy, but one of the main roadblocks that made BLC barely feasible was the (comparably...) large ROM that it requires. Executing simple instructions in Malbolge generally incurs similar kind of latency as the more complicated ones, hence to slightly improve performance (not nearly enough - notice that the Lisp still has a "loading bar"!), I have decided that a complicated set of primitives for a language to run on top of Malbolge would be a necessity. This is further supported by some issues with Malbolge regarding the code placement and loading a code image, previously solved by e.g. Matthias Lutter (and subsequently used in my Malbolge code) in his very simple (and if I remember correctly, slower than the LISP) brainfuck interpreter. Another venue to explore is University of Nagoya's Malbolge toolchain, which is functional and probably a very good starting point - <a href="https://www.trs.css.i.nagoya-u.ac.jp/projects/Malbolge/" rel="nofollow">https://www.trs.css.i.nagoya-u.ac.jp/projects/Malbolge/</a>. Once you jump this hoop, you can now start synthesizing basic operations using Nop/MovD;Jmp flags and Malbolge instructions - e.g. have the interpreter code set a flag, jump to a single routine which does a complex operation; based on the state of all flags the routine can then decide where to return. The more complex the instruction set, the more complex the primitive operations, and hence the better is the performance you may get. Assuming that you do not exactly want to write an optimising compiler in Malbolge which does something akin to mop-fusion of RISC CPUs, of course :-). Most of MalbolgeLisp was written when I was 16, then I have moved onto KamilaLisp (Java), as the codebase written in Malbolge grew in size and became more annoying to add interesting features to. Unfortunately due to job and university requirements I no longer have the time (and motivation) for these kinds of amusement.<p>As for the compression: probably an artifact of a bigger block size and a closer-to-optimal entropy coding stage in bzip3 (simple model + binary arithmetic coding; fast suffix sorting due to research of Ilya Grebnov) vs bzip2's suboptimal implementation of what could have been Package-Merge that currently assigns excessively long Huffman codes (as I discovered while doing research for my data compression book); also probably the RLEs everywhere that Seward considers a mistake, small BWT blocks, etc. You could try the tool <a href="https://pastebin.com/6DUKs4q9" rel="nofollow">https://pastebin.com/6DUKs4q9</a>, which eliminates the redundancy associated with the Malbolge encoding (which bzip3 kind of catches on without any preprocessing, while bzip2 not entirely) and drastically improves performance of all other compressors:<p><pre><code>    % ./a d <blc.mb >blc.n
    % bzip3 -vfb50 blc.n
      blc.n:  48175489 -> 647179 bytes, 1.34%, 0.11 bpb
    % bzip3 -vfb50 blc.mb
      blc.mb: 48175489 -> 1025582 bytes, 2.13%, 0.17 bpb</code></pre></p>
]]></description><pubDate>Wed, 03 Jan 2024 12:30:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=38853297</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=38853297</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38853297</guid></item><item><title><![CDATA[New comment by palaiologos in "Qbdiff – building and applying patches to binary files"]]></title><description><![CDATA[
<p>hi, most of the code in my repository has to work around various C problems (e.g. no generics), so match32 and match64 are the same functions that work on differently sized buffers - if I had generics and RAII, the diffing and patching source code would have been comparable in size to your project.<p>I also don't see robust error handling in your code, which usually costs lines of code (especially in C) too.<p>The difference in delta technique is certainly not negligible, as my code still uses Colin Percival's algorithm, while you seem to have settled on something else. It's also important to point out that being "better than xdelta" means pretty much the same as "having more than nothing", because xdelta has already been superseded 20 years ago by bsdiff[1], which in turn would ideally be superseded by my project.<p><pre><code>  [1]: https://www.daemonology.net/bsdiff/</code></pre></p>
]]></description><pubDate>Sat, 21 Jan 2023 08:53:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=34464958</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=34464958</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34464958</guid></item><item><title><![CDATA[New comment by palaiologos in "Qbdiff – building and applying patches to binary files"]]></title><description><![CDATA[
<p>I'm sharing a tool that I have been working on in hopes that someone finds it useful. The tool serves the purpose of binary patching in game updates and personal incremental backups. Thanks to a different SA-IS algorithm and parallel compression of blocks, the diffing and patching is considerably faster compared to bsdiff or alternatives. This makes binary patching, in many cases, a viable option.</p>
]]></description><pubDate>Fri, 20 Jan 2023 21:34:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=34460259</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=34460259</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34460259</guid></item><item><title><![CDATA[Qbdiff – building and applying patches to binary files]]></title><description><![CDATA[
<p>Article URL: <a href="https://github.com/kspalaiologos/qbdiff">https://github.com/kspalaiologos/qbdiff</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=34460258">https://news.ycombinator.com/item?id=34460258</a></p>
<p>Points: 26</p>
<p># Comments: 4</p>
]]></description><pubDate>Fri, 20 Jan 2023 21:34:08 +0000</pubDate><link>https://github.com/kspalaiologos/qbdiff</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=34460258</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34460258</guid></item><item><title><![CDATA[New comment by palaiologos in "Bzip3 – A better and stronger spiritual successor to bzip2"]]></title><description><![CDATA[
<p>I haven't figured a libsais fix and my LZP fix changes the functionality a little (removes chunking for better compression at a rather small runtime cost), so I don't think the author would like me to submit it.
I have opened tickets, though.</p>
]]></description><pubDate>Fri, 13 May 2022 17:32:36 +0000</pubDate><link>https://news.ycombinator.com/item?id=31370380</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=31370380</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31370380</guid></item><item><title><![CDATA[New comment by palaiologos in "Bzip3 – A better and stronger spiritual successor to bzip2"]]></title><description><![CDATA[
<p>You've literally tested it on a single file, enwik8. That's not enough to extrapolate valuable results. One of the benchmarks:<p><pre><code>  time ./bsc e ../linux.tar linux.bsc -e2 -b16 -T
  68.69s user 1.14s system 99% cpu 117M memory 1:09.84 total
</code></pre>
While bzip3 uses 98M, takes 1min 17s to produce a 129023171 byte file, compared to 127747834B from BSC. They're very similar except bzip3 tends to use less memory and decompresses a little slower. BSC is much more mature than bzip3 though, and the benchmarks might be a subject to change some time in the future. Surprisingly, BSC code isn't really that robust (I reported a UB bug to libsais and had to pretty much rework the LZP code because it couldn't stand fuzzing).</p>
]]></description><pubDate>Fri, 13 May 2022 11:16:27 +0000</pubDate><link>https://news.ycombinator.com/item?id=31365927</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=31365927</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31365927</guid></item><item><title><![CDATA[New comment by palaiologos in "Bzip3 – A better and stronger spiritual successor to bzip2"]]></title><description><![CDATA[
<p>Consider using `-c`, which makes the compressor use standard streams, or pull the main branch because I had just pushed a tiny patch that automatically enables it when no positional arguments are given.</p>
]]></description><pubDate>Wed, 11 May 2022 15:04:30 +0000</pubDate><link>https://news.ycombinator.com/item?id=31341015</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=31341015</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31341015</guid></item><item><title><![CDATA[New comment by palaiologos in "Bzip3 – A better and stronger spiritual successor to bzip2"]]></title><description><![CDATA[
<p>lies. not specifying -e displays an error message:<p><pre><code>  % bzip3 -e -j 6 -b 50 corpus/calgary.tar
  % bzip3 -j 6 -b 50 corpus/calgary.tar
  bzip3 - A better and stronger spiritual successor to bzip2.
  Copyright (C) by Kamila Szewczyk, 2022. Licensed under the terms of GPLv3.
  Usage: bzip3 [-e/-d/-t/-c] [-b block_size] input output
  Operations:
    -e: encode
    -d: decode
    -t: test
  Extra flags:
    -c: force reading/writing from standard streams
    -b N: set block size in MiB
    -j N: set the amount of parallel threads
</code></pre>
you can use bzip3 as a filter:<p><pre><code>  % cat corpus/calgary.tar | bzip3 -b 10 -e -c | wc -c
  807959
</code></pre>
and using "-j6" is simply being unable to read the help page.</p>
]]></description><pubDate>Tue, 10 May 2022 17:30:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=31329824</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=31329824</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31329824</guid></item><item><title><![CDATA[New comment by palaiologos in "Bzip3 – A better and stronger spiritual successor to bzip2"]]></title><description><![CDATA[
<p>it's `bzip3 -e -j 6`. you need a space.</p>
]]></description><pubDate>Tue, 10 May 2022 16:49:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=31329327</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=31329327</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31329327</guid></item><item><title><![CDATA[New comment by palaiologos in "Bzip3 – A better and stronger spiritual successor to bzip2"]]></title><description><![CDATA[
<p>no compressor tests the output while compressing as it hurts the performance. you can do it after compressing, though, using `bzip3 -t`.</p>
]]></description><pubDate>Tue, 10 May 2022 12:15:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=31326147</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=31326147</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31326147</guid></item><item><title><![CDATA[New comment by palaiologos in "Bzip3 – A better and stronger spiritual successor to bzip2"]]></title><description><![CDATA[
<p>zstd -19 linux.tar  462.58s user 0.76s system 100% cpu 217M memory 7:42.56 total<p>% wc -c linux.tar.zst linux.bz3
134980904 linux.tar.zst
129255792 linux.bz3</p>
]]></description><pubDate>Tue, 10 May 2022 11:18:49 +0000</pubDate><link>https://news.ycombinator.com/item?id=31325739</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=31325739</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31325739</guid></item><item><title><![CDATA[New comment by palaiologos in "Bzip3 – A better and stronger spiritual successor to bzip2"]]></title><description><![CDATA[
<p>Frankly, same holds for gzip. I've been planning to relicense bzip3 with the more permissive LGPLv3.</p>
]]></description><pubDate>Tue, 10 May 2022 10:57:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=31325587</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=31325587</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31325587</guid></item><item><title><![CDATA[New comment by palaiologos in "Bzip3 – A better and stronger spiritual successor to bzip2"]]></title><description><![CDATA[
<p>it's fairly common, at least in the circles i usually dwell in, to call compression ratio "compression _strength_".
bzip3 is _better_ than bzip2 since it uses a better technological model as outlined in one of my replies.</p>
]]></description><pubDate>Tue, 10 May 2022 09:42:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=31325178</link><dc:creator>palaiologos</dc:creator><comments>https://news.ycombinator.com/item?id=31325178</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31325178</guid></item></channel></rss>