ZX Review #7-8-9-10
08 ноября 1997 |
|
Forum - Improve Art Studio. Ideas on file compression.
(C) Fes'kov Kuzma, Abakan For the column "Forum" I propose today advice on improving the well-known to all program ART STUDIO, more precisely, its version for 128 kilobytes. Remember how many agonizing minutes you spent in trying to mention two of the same window. On my opinion, make the move the window a few pixels on a bad decision, but in this situation there is one simple solution. When this option is selected the arrow changes to a square, whose center corresponds to the corner. I propose to replace this box with "+", whose center and will be the starting point for the window. The cursor will look like when editing under a magnifying glass. Not try to find a sprite, corresponding to this square, all the more complicated (in my opinion, the authors have wasted a couple of tens of bytes). So what also need to change: After the program started, we must change the following bytes - 57,569.16, 57,572.16; 57575.16, 57578.254, 57581.16; 57584.16, 57587.16. This can be done using the built-in ROM monitors. Owners of other computers will have to find the address yourself. I want to share with you their ideas about file compression. In particular, method of Hoffman. At this stage, and indeed for the Spectrum, the idea archives it seems to me you do not want because the size wrong, and programs now are compressing the authors. And Need self-extracting files (such as those that produce compressors KSA and others). To select for the files containing the data of one type, a certain tree decompression me seems a little awkward, because even for these files difference can fluctuate wildly. My method of constructing the tree is built decompression simply, the truth, and the compression of a file takes some time (and not so great). Before the beginning of compression, we must build a tree, on which will be compressed, and this is done very simple - we just must count the number of identical bytes, that is, how much Once the file meets the code 0, 1, 2 and so on (here we mean not in a row following bytes, and All occurrences). Next, we should sort the data descending. This is done pretty simple. The obvious advantage of this method is the possibility of constructing a tree reduce its size. This, in particularly true for text files, where the size of the tree sometimes reduced to 100, and then and 150 bytes, whereas in the proposed size of your way always fixed. In simple programs (even very large) As a rule, you can find 10.5 bytes that do not fall into They never. I've shared just an idea, and maybe it will help someone. Lead resulting from I have a program I did not, so as it is far from perfect, yes and decompressor is too slow. *
Other articles:
Similar articles:
В этот день... 21 November