XNB files 100x bigger than they should be

"I’m still wondering why a 1 MB becomes a 100 MB file"

PNG file is a lossless file format it uses LZW compression when written in physical storage that’s why it’s small in size compare when compiled to XNB.

PNG file compiled to XNB is much larger in size because its UNCOMPRESSED when
written to disk for the purpose of NOT decompressing it on loading time meaning it’s much FASTER.

Normally our physical storage is much larger than our memory I couldn’t care less the size on disk as long it’s much faster in loading time ^_^y

The xnb when you ship is probably gonna be ziped up with the rest of you exe then you send it over the net to the user it will be smaller. When he installs he decompresses the files and now that sits on his drive uncompressed. When he loads the game i guess the idea is that there is no processing involved so it loads faster. That’s one idea.

However

I don’t think even streaming that much data in from the drive is faster then streaming in less and decompressing it on the fly. Computations are faster then drive to ram access, so i would say that the compress setting should be used before shipping.

I think the best reason when your designing not to turn on the compress flag is that it will make compile time take longer.

But that’s just opinion if there is any reason not to use the compress flag i haven’t heard it yet.

1 Like