Thursday, May 31, 2007

Huffman Compression

Well, as mentioned above, I spend more time with coding in the last few weeks. I tried myself with my own implementation of Huffman Compression. (see Huffman Compression for more information).
While doing the huffman compression for a sentence with pen&paper is really easy and intuitive, writing a C programm is quite difficult: it took my really some time to build the huffman tree. Ok, I made two stupid typo-errors and linked the child leafes wrong... this resulted in time-consuming debugging. Well, sometimes I'm an idiot ;-)
But the compression itself was really hard! First I printed the huffman codes out as strings to be sure it works... not that big thing. But really save the codes as bits was pretty difficult and time-consuming and needed some fancy 'bit action'. Again, I made a stupid mistake by saving the codes in wrong direction in the compressed file, so decompressing failed for sure.
Finally, it works... but: it's really really slow and the compressed file is bigger than the original file cause of the overhead I save (the huffman tree). This must definitely optimized. But what sucks most is that my little programm hangs if compressing files larger than about 5MB. I fuckin' don't know why! So it will take some time till I will release the source on my site.
Have a nice weekend!

Monday, May 28, 2007

Got a new laptop... and Vista.


a few days ago I started with some coding and reversing after I had done nothing for a long time. I code a little game in Java and also a bruteforcer which can give the solution, but there will be more information about that on my website in a few weeks. I also thought about coding my own implementation of Huffman-Encoding-Algorithm, but I'm not sure if I should do that.
Anyway, one incident stopped me: my laptop finally broke down. I had problems with it for some time: the battery didn't charge anymore, the touchpad didn't react and, most important, the display often flickered and switched itself off. And now the graphic card broke down, more than some purple lines on the display could not be seen.
So I decided to spend my saved money for a new laptop: I decided myself for a HP Pavilion dv6000. Main features: Core 2 Duo, 1GB Ram, 160GB and a lot of additional stuff. Runs very nice, but... oh no... no XP was shipped but Vista!!! Well after 3 days I slowly feel comfortable with this new OS, but I like XP more. Perhaps it will just take some time.
But I needed a patch to start Visual Studio 2005!!! What's that? Up-to-date Microsoft products are not compatible with Vista? They are all stupid...
Fortunately till now I had no further problems, but they will come... Let's see what will be next...