The Pack200 spec is designed to specify the bitwise image of uncompressed files.
So both implementations of the unpacker (C and Java) should produce the same output.
A disagreement signals a bug in one or both implementations.
Jeroen Fritjers reports: It appears that under some (difficult to isolate so far) circumstances, the "BootstrapMethods" UTF8 CP entry ends up in the class, even though there aren't any bootstrap methods.
Jeroen also says that moving the statement in PackageReader.java that begins "if (bsms.isEmpty())" before the statement "int changed = cls.expandLocalICs();" seems to fix the problem.
The correctness of constant pool pruning depends sensitively on the ordering of other stripping operations. It also interacts with the pruning of BootstrapMethods and InnerClasses attributes (which are also global tables for Pack200). It may be that a more iterative code pattern is required in PackageReader.reconstructLocalCPMap, which would prune the class file's symbolic references until nothing changes. On the other hand, it may be enough to find the most correct static ordering of pruning operations, as in Jeroen's suggested fix.