On Fri, Jul 22, 2011 at 8:15 AM, Andras Timar <tima...@gmail.com> wrote: > Hi, > > I'm studying the binary .res format and I noticed that every .res file > contains a 2168 bytes long data block. This data block contains the > enumeration of VCL resource types, however, it is never read and seems > to be unnecessary. I thought that it would be a small size win, I > removed this block. 2158 bytes x 71 .res files x 105 languages = > 15MB.
Are you sure you actually saved that 'much' ? presumably this 2158 bytes repeated 71 times should compress well enough when packaged > > I tried to find out why resource compiler writes this block to .res > files but unfortunately I could not understand the code. When I > removed these structures from memory, the resource compiler did not > work. So I had to do the hack which is attached here. I detected the > magic bytes at the beginning of the block and I moved the pointer 2168 > bytes further at fwrite(). > > LibreOffice master builds and runs fine with this patch. > > Please review it, I'm not sure if such low level hacks are acceptable. :) Looks pretty ugly to me. That code seems neglected enough without adding another layer of WTF-factor for the poor soul that one day will want/have to maintain it. Norbert _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice