Wis file Format

Join Discord

shorty606

Golden Oldie
Golden Oldie
Apr 10, 2005
867
0
122
I was wondering if anyone could give me help, specifically kyn and gadget. I am trying to make a reader for it and possibly a new component like wil which I will share.
So far I've figured out the header, the palette contained within and the individual image headers eg placement and size, from which I can get the byte size until the next image. I was wondering if you could help me with the compression the images uses. If I try to read it like a wil would that work? I want to know before I rewrite the wil component and feed it the bytes that are the images for wis files. I'm not just trying to get handouts, im actually trying to figure it out but seeing as I only really looked at the wil image format today (which I totally get) I can't see any patterns to ascertain what encoding is used.
Help would be greatly appreciated. Also, would anyone like to help me with the snow encryption? I can read 1 image from the snow tiles that noone can open and I know that the wix file is encrypted but the wil file seems to be intacted but lacks an index so I've been trying to use a method that I assume wis uses where I get teh image header and work out the total byes of the image and therefore where the next image starts. I've been doing this to try and build a new wix file from a wil :).
 

kyndigs

LOMCN Developer
Developer
Feb 19, 2009
1,126
117
190
Reading, UK
Output all the bytes in decimal and you should see the pattern.

There are two types of file decompressed and compressed. If the first byte = 1 the its compressed, else its uncompressed and requires no decompression.

I presume you know how compression works? Look for byte which gives you the number of repeating pixels and duplicate them.

after the header, if the first byte = 0 then read the next byte as a count and the byte after as the colour and repeat that colour for the count.

and keep doing this.

Also with wis there was no clear indexing, so i assume in the chinese files they create the indexing each time the file is opened.

Send me snow tiles ill take alook. [email protected]
 
Last edited:

shorty606

Golden Oldie
Golden Oldie
Apr 10, 2005
867
0
122
Thanks Kyn :) i saw that 01 byte and assumed it was just saying it was the start of a new header, I did think it was a bit weird to use that and not just start another header. Thanks so much for the help, I understand how it work now, I had it in my head it was kinda encrypted rather than actually thinking it worked like zip compression, well sort of. I wonder how they use wis files ina client with no index file? seems a bit of a pain to have to scan the whole file, unless they build a memory index for each wis? lol I'm getting carried away. I reckon it wouldn't be too hard to make a program to export wis to a format that could be made into a wil using kaoris wil thingy. I know you were attempting this, how's it going?
 

kyndigs

LOMCN Developer
Developer
Feb 19, 2009
1,126
117
190
Reading, UK
Thanks Kyn :) i saw that 01 byte and assumed it was just saying it was the start of a new header, I did think it was a bit weird to use that and not just start another header. Thanks so much for the help, I understand how it work now, I had it in my head it was kinda encrypted rather than actually thinking it worked like zip compression, well sort of. I wonder how they use wis files ina client with no index file? seems a bit of a pain to have to scan the whole file, unless they build a memory index for each wis? lol I'm getting carried away. I reckon it wouldn't be too hard to make a program to export wis to a format that could be made into a wil using kaoris wil thingy. I know you were attempting this, how's it going?

We did do it, gadget wrote a function to export straight to wil and i wrote one to export placements and images to be exported to wil. Gadgets still needs a bit of work, and mine can take about 30mins for 100,000 images and placement files, which is why they they are disabled.