Click here to Skip to main content
15,891,981 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralThe website Medium.com is a POS Pin
swampwiz16-Jul-21 17:19
swampwiz16-Jul-21 17:19 
GeneralRe: The website Medium.com is a POS Pin
OriginalGriff16-Jul-21 19:21
mveOriginalGriff16-Jul-21 19:21 
GeneralRe: The website Medium.com is a POS Pin
swampwiz16-Jul-21 19:50
swampwiz16-Jul-21 19:50 
GeneralRe: The website Medium.com is a POS Pin
OriginalGriff16-Jul-21 20:38
mveOriginalGriff16-Jul-21 20:38 
GeneralRe: The website Medium.com is a POS Pin
BillWoodruff16-Jul-21 22:08
professionalBillWoodruff16-Jul-21 22:08 
GeneralRe: The website Medium.com is a POS Pin
Sander Rossel17-Jul-21 1:55
professionalSander Rossel17-Jul-21 1:55 
GeneralRe: The website Medium.com is a POS Pin
Slow Eddie17-Jul-21 2:45
professionalSlow Eddie17-Jul-21 2:45 
GeneralIt hurts my brain! So this is fun. And perhaps novel Pin
honey the codewitch16-Jul-21 12:45
mvahoney the codewitch16-Jul-21 12:45 
I'm trying to do in-place decompression of zip files such that you don't need to actually extract the streams in order to get the decompressed contents.

Basically, you can open a zip and read it and it will decompress on demand while you do block reads off of a special implementation of a stream it gives you.

I'm not great at math, or doing compression and cryptography algorithms even if I vaguely understand the concepts, so it was lucky for me that I found some of the relevant code in the public domain.

However, it does callbacks such that you give it a function it uses to flush data as it writes.

I can't use callbacks because I'm presenting a stream interface. You need to be able to request a block to be decompressed, at which point one fragment of the decompression takes place.

So basically, I need to turn this into a coroutine.

It's a bit like turning a SAX style xml reader into an XmlReader style pull parser.

It's mind bending. One big issue is I don't know how big the minimum buffer for an huffman block is, and even when I do I have to sift through some incomprehensible code.

What I thought would take me part of a day may take me a few, but it's an adventure.

I keep telling myself that in the end this will be worth all the effort because it means I can create better e-pub readers on cheaper hardware, and possibly even browse the web from an ESP32 or soon, an ARM Cortex-M or other IoT gadget (the code should work, I'm just not clear on the memory requirements of my own code yet, but it's light).

Why zips? Zips are just part of the mess because EPUBs are renamed zip files that contain their html and image content. And I'll be using them as packages to deploy HTML based UIs probably as well.


The only reason any of this works is all of it is streamed on demand and progressively loaded, from the zips, to the images and html contained therein, to the truetype fonts used to render the text. It's all demand streamed so it never needs to be loaded all at once, keeping the memory requirements tiny

It's gonna be so darned cool. Imagine a (bare bones, think lynxish but with graphics) web browser on a $5-$10 SoC Smile | :) Smile | :) Smile | :)
Real programmers use butterflies

GeneralRe: It hurts my brain! So this is fun. And perhaps novel Pin
Gary R. Wheeler16-Jul-21 13:54
Gary R. Wheeler16-Jul-21 13:54 
GeneralRe: It hurts my brain! So this is fun. And perhaps novel Pin
honey the codewitch16-Jul-21 14:21
mvahoney the codewitch16-Jul-21 14:21 
GeneralApple slips in sales ranking - again. Pin
OriginalGriff16-Jul-21 9:05
mveOriginalGriff16-Jul-21 9:05 
GeneralRe: Apple slips in sales ranking - again. Pin
PIEBALDconsult16-Jul-21 9:16
mvePIEBALDconsult16-Jul-21 9:16 
GeneralRe: Apple slips in sales ranking - again. Pin
Chris Maunder16-Jul-21 10:33
cofounderChris Maunder16-Jul-21 10:33 
GeneralRe: Apple slips in sales ranking - again. Pin
BillWoodruff16-Jul-21 22:23
professionalBillWoodruff16-Jul-21 22:23 
GeneralRe: Apple slips in sales ranking - again. Pin
abmv18-Jul-21 8:40
professionalabmv18-Jul-21 8:40 
GeneralRe: Apple slips in sales ranking - again. Pin
OriginalGriff18-Jul-21 8:44
mveOriginalGriff18-Jul-21 8:44 
GeneralTypescript optimisation benchmarks Pin
Chris Maunder16-Jul-21 6:17
cofounderChris Maunder16-Jul-21 6:17 
GeneralRe: Typescript optimisation benchmarks Pin
PIEBALDconsult16-Jul-21 7:56
mvePIEBALDconsult16-Jul-21 7:56 
GeneralRe: Typescript optimisation benchmarks Pin
Chris Maunder16-Jul-21 10:32
cofounderChris Maunder16-Jul-21 10:32 
GeneralRe: Typescript optimisation benchmarks Pin
PIEBALDconsult16-Jul-21 11:35
mvePIEBALDconsult16-Jul-21 11:35 
GeneralRe: Typescript optimisation benchmarks Pin
Chris Maunder16-Jul-21 16:13
cofounderChris Maunder16-Jul-21 16:13 
GeneralRe: Typescript optimisation benchmarks Pin
Gary R. Wheeler16-Jul-21 10:37
Gary R. Wheeler16-Jul-21 10:37 
GeneralRe: Typescript optimisation benchmarks Pin
PIEBALDconsult16-Jul-21 11:25
mvePIEBALDconsult16-Jul-21 11:25 
GeneralRe: Typescript optimisation benchmarks Pin
Gary R. Wheeler16-Jul-21 13:43
Gary R. Wheeler16-Jul-21 13:43 
GeneralRe: Typescript optimisation benchmarks Pin
honey the codewitch16-Jul-21 13:00
mvahoney the codewitch16-Jul-21 13:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.