I have just finished (and attached) a patch for the latest CVS-release
of OCaml, which adds a new marshalling flag. This flag generates a
different marshalling format, which uses absolute addresses to refer
to shared values. This fixes the problem of bad compressibility of
marshalled OCaml data. See the patch header for more information.

Since the patch is quite small and does not break any existing code,
we'd be very grateful if it could be made part of the next
OCaml-release. Thanks!

A quick update to this issue: the patch for "absolute sharing" contains a copyright notice for Jane Street Holding, LLC. As far as I know INRIA has a policy that copyright must be transferable to INRIA, otherwise code cannot be integrated into official distributions.

Since this patch would otherwise be of rather limited use to INRIA and hence other OCaml-users, including us, we (Jane Street Holding, LLC) herewith grant INRIA the right to redistribute or use any code contained in the above file "absolute.patch" in any form without any restrictions, with our without any reference to our authorship. We, Jane Street Holding, LLC, disclaim any and all responsibility or liability arising from the use of this patch and its contained code as stated in the original patch.

I hope this will make it easier for you to accept this patch. The implemented feature would be very helpful for many users who have to store large amounts of marshaled data. The only way around this problem right now is to essentially maintain a patched copy of the affected runtime files, which is quite inconvenient. The proposed patch is very simple and should not break existing code. It would be great if it could be added in an upcoming release. Thanks!