On Fri, Jul 22, 2011 at 8:15 AM, Andras Timar <timar74@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
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.