Click here to Skip to main content
15,894,907 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.

 
GeneralRe: This Guy Bought The Personal Computer From Hell, And It's The Most Relatable Horror Movie You'll Ever Watch Pin
Southmountain18-Jul-21 15:47
Southmountain18-Jul-21 15:47 
GeneralRe: This Guy Bought The Personal Computer From Hell, And It's The Most Relatable Horror Movie You'll Ever Watch Pin
kmoorevs18-Jul-21 11:34
kmoorevs18-Jul-21 11:34 
GeneralRe: This Guy Bought The Personal Computer From Hell, And It's The Most Relatable Horror Movie You'll Ever Watch Pin
Richard MacCutchan19-Jul-21 0:36
mveRichard MacCutchan19-Jul-21 0:36 
GeneralRe: This Guy Bought The Personal Computer From Hell, And It's The Most Relatable Horror Movie You'll Ever Watch Pin
swampwiz18-Jul-21 11:42
swampwiz18-Jul-21 11:42 
GeneralRe: This Guy Bought The Personal Computer From Hell, And It's The Most Relatable Horror Movie You'll Ever Watch Pin
Cp-Coder18-Jul-21 13:28
Cp-Coder18-Jul-21 13:28 
GeneralRe: This Guy Bought The Personal Computer From Hell, And It's The Most Relatable Horror Movie You'll Ever Watch Pin
Richard MacCutchan18-Jul-21 21:52
mveRichard MacCutchan18-Jul-21 21:52 
GeneralRe: This Guy Bought The Personal Computer From Hell, And It's The Most Relatable Horror Movie You'll Ever Watch Pin
Rage19-Jul-21 6:47
professionalRage19-Jul-21 6:47 
GeneralI just spent two days on nothing, but all is not lost! C# to the rescue Pin
honey the codewitch18-Jul-21 3:55
mvahoney the codewitch18-Jul-21 3:55 
I am still working on my streaming zip library, and after bouncing between other people's implementations and trying to adapt them I settled on one that was already implemented as a coroutine (which is what I needed)

I worked on it for two days, trying to get it to decompress in chunks. I got it to do a whole buffer at a time but I could not work out how to use this scarcely documented decompression coroutine in the popular minizw.h offering so that it would act like the coroutine it was supposed to be.

So eventually, I googled "tinfl_decompress"

Pay dirt! There's a sample of using it. In the comments I note my output buffer has to be at least 32kB - well that explains a lot. 32kB isn't ideal, but I can work with it if i have to.

In the comments it also notes that one of the necessary component structs its using is about 300kB!

300kB is about the amount of *total RAM* I have available on my system.

That's not counting the input and output buffers I need, and heaven forbid the zip contains a JPEG i need to decompress - I'll have no memory left!

So all this code I wrote around this function is bunk.

Fortunately, I found another implementation of a previous C implementation I was using, only someone had ported it to C#. Yay!

And then I realized one of the reasons that's such a boon. NO PREPROCESSOR. There were pages of macros in the original source. It was one of the reasons I didn't want to touch it.

The thing isn't implemented as a coroutine unfortunately, but the code is something that can be followed and adapted.

I've said it before - I love C#. I don't even use it regularly anymore, but it's nice to have around.

Less is more.
Real programmers use butterflies

GeneralRe: I just spent two days on nothing, but all is not lost! C# to the rescue Pin
Kenneth Haugland18-Jul-21 4:40
mvaKenneth Haugland18-Jul-21 4:40 
GeneralRe: I just spent two days on nothing, but all is not lost! C# to the rescue Pin
honey the codewitch18-Jul-21 4:54
mvahoney the codewitch18-Jul-21 4:54 
GeneralRe: I just spent two days on nothing, but all is not lost! C# to the rescue Pin
Greg Utas18-Jul-21 5:22
professionalGreg Utas18-Jul-21 5:22 
GeneralRe: I just spent two days on nothing, but all is not lost! C# to the rescue Pin
honey the codewitch18-Jul-21 5:26
mvahoney the codewitch18-Jul-21 5:26 
GeneralRe: I just spent two days on nothing, but all is not lost! C# to the rescue Pin
Kenneth Haugland18-Jul-21 6:38
mvaKenneth Haugland18-Jul-21 6:38 
GeneralRe: I just spent two days on nothing, but all is not lost! C# to the rescue Pin
honey the codewitch18-Jul-21 6:41
mvahoney the codewitch18-Jul-21 6:41 
GeneralRe: I just spent two days on nothing, but all is not lost! C# to the rescue Pin
Kenneth Haugland18-Jul-21 11:53
mvaKenneth Haugland18-Jul-21 11:53 
GeneralRe: I just spent two days on nothing, but all is not lost! C# to the rescue Pin
Dan Neely19-Jul-21 3:20
Dan Neely19-Jul-21 3:20 
GeneralRe: I just spent two days on nothing, but all is not lost! C# to the rescue Pin
OriginalGriff18-Jul-21 5:18
mveOriginalGriff18-Jul-21 5:18 
GeneralRe: I just spent two days on nothing, but all is not lost! C# to the rescue Pin
Greg Utas18-Jul-21 7:04
professionalGreg Utas18-Jul-21 7:04 
GeneralRe: I just spent two days on nothing, but all is not lost! C# to the rescue Pin
swampwiz18-Jul-21 11:46
swampwiz18-Jul-21 11:46 
GeneralRe: I just spent two days on nothing, but all is not lost! C# to the rescue Pin
honey the codewitch18-Jul-21 12:28
mvahoney the codewitch18-Jul-21 12:28 
GeneralRe: I just spent two days on nothing, but all is not lost! C# to the rescue Pin
swampwiz19-Jul-21 8:23
swampwiz19-Jul-21 8:23 
GeneralRe: I just spent two days on nothing, but all is not lost! C# to the rescue Pin
Gary R. Wheeler18-Jul-21 14:38
Gary R. Wheeler18-Jul-21 14:38 
GeneralRe: I just spent two days on nothing, but all is not lost! C# to the rescue Pin
swampwiz19-Jul-21 8:25
swampwiz19-Jul-21 8:25 
GeneralWisdom with my tea Pin
W Balboos, GHB18-Jul-21 1:09
W Balboos, GHB18-Jul-21 1:09 
GeneralRe: Wisdom with my tea Pin
peterkmx18-Jul-21 4:12
professionalpeterkmx18-Jul-21 4:12 

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.