News for hackers. Stuff that matters.
Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by EdSchouten on Saturday September 05, 2026 @04:53PM (#49580546)
Interesting that it doesn’t use the same open source license as Vorbis/Opus itself. Otherwise improvements like these could be upstreamed?
Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by merbanan on Saturday September 05, 2026 @05:03PM (#49580656)
Vorbis sends the entropy tables in the actual file at the start.

https://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-470003

If you have the complete file you can calculate the optimal ones. In a streaming scenario that does not work and you have use something you think is good.

Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by eru on Monday September 07, 2026 @05:22AM (#49596018)
I wonder if you could send new tables every so often in your stream?
Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by BoingBoomTschak on Saturday September 05, 2026 @05:04PM (#49580677)
Those .blr extensions in the examples are making me doubt: the result is still conformant and playable ogg Vorbis/Opus, right?
Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by sinnet3000 on Saturday September 05, 2026 @05:13PM (#49580757)
From what I can see, it's more like a specialized ZIP-like compressor for Vorbis/Opus files. You archive them on blr, and decompress them back to the original format.
Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by ncruces on Saturday September 05, 2026 @07:28PM (#49581776)
Kinda like what Dropbox Lepton did for JPEG back then.

https://github.com/dropbox/lepton

Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by BoingBoomTschak on Sunday September 06, 2026 @04:23AM (#49584412)
Ah, it's basically a PAQ context.
Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by embedding-shape on Sunday September 06, 2026 @07:11AM (#49585354)
Simpler: it's basically ZIP but specific to one format.
Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by bigC5560 on Saturday September 05, 2026 @05:19PM (#49580792)
I just tested this out for myself and I was unable to play the .blr file in VLC or using ffplay. It is not recognized as anything by ffprobe either. So it seems like you need to decompress it to play it in a standard player unfortunately.
Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by RicoElectrico on Sunday September 06, 2026 @10:37AM (#49586919)
There is a long history of compressors that replace the entropy coding layer of a codec with something else entirely. This is exactly it.
Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by tux3 on Saturday September 05, 2026 @05:07PM (#49580700)
So, it looks like this tries to build a model (or rather, multiple layers of models combined with something called context mixing[0]), potentially analyzing the whole file first? Is it fair to call this a very fancy entropy coder, replacing the last phase of what a traditional audio codec does (the lossless part, after quantization)?

I like the code style, this is pretty nice C. It's refreshing to see human code.

[0]: https://en.wikipedia.org/wiki/Context_mixing

Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by RicoElectrico on Sunday September 06, 2026 @10:35AM (#49586907)
> I like the code style, this is pretty nice C.

Or is it? https://github.com/iczelia/balrogg/blob/7008bdc10ff25ad87105...

Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by tux3 on Sunday September 06, 2026 @12:08PM (#49587885)
I admit I'm not a fan of the loop macros, or writing constants like 0xd80000 in decimal, or having all of that code inlined with no further explanation or git history.

But I think it's just that this file is lifting parts of the logic from PAQ8 (the inlined num_states/next_state named in a comment sure look exactly like PAQ functions translated into C, which, kudos to PAQ for having extensive comments in their code by the way).

I'm a bit disappointed that PAQ isn't mentioned in the README, and only very obliquely in the code, if that's where those functions come from. PAQ is GPLv3, at least a mention could have been nice (assuming I'm not wrong about the source of that logic).

Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by palaiologos on Sunday September 06, 2026 @12:30PM (#49588111)
I use the PAQ terminology as it is likely to be familiar to other compression experts. However, the lineage to PAQ is very, very limited, and many other compressors also re-use its common ideas.
Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by tux3 on Sunday September 06, 2026 @12:47PM (#49588317)
I see, my bad. I tried to follow the comment and jumped to conclusions, sorry about that.
Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by genxy on Sunday September 06, 2026 @04:53PM (#49590825)
This code looks like Fortran55
Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by sinnet3000 on Saturday September 05, 2026 @05:12PM (#49580750)
The git username sounded familiar, it's from the same developer that created bzip3.
Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by slyall on Sunday September 06, 2026 @09:15PM (#49592686)
Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by functionmouse on Saturday September 05, 2026 @10:56PM (#49582884)
Why was this written with explicit Windows 95 support? Just 'cuz?
Re:Balrogg: Demonically compacting (up to 15%) lossless Vorb... by lightedman on Sunday September 06, 2026 @01:13AM (#49583519)
Probably the same reason it was written with explicit DOS support.