Migration Guide : Migrating from Version 8.6.1 : EmCompressor compression/decompression algorithm changed
EmCompressor compression/decompression algorithm changed
Reason for change
When storing source code in the library, the source code is compressed to save space. The compression algorithm (V1) used by EmCompressor>>#compress is sensitive to both the platform it is running on and to the current locale. This means that it may be impossible to decompress some source code if the platform or locale is changed after the source code is saved.
Change
A new compression algorithm (V2) is introduced that is not affected by the execution platform or the current locale, and a matching new decompression function is added to the native and server library access primitive modules:
Compression is always done with the new V2 compression algorithm
Decompression supports both the old V1 format and the new V2 format
Action required
In short, any image connecting to a manager with >= 8.6.2 code in it will need to use the new library primitives distributed with 8.6.2 or beyond.  Older library primitives cannot properly decompress source created by the new library primitives.
On Windows these library primitives are called emntv50.dll and emsrv50.dll. On Unix they are libemntv50.dll and libemsrv50.dll. Copy these from >= 8.6.2 installations and replace the files with the same name found in < 8.6.2 installations. All versions of VA Smalltalk installed on the system should now have updated library primitives.
Detailed Description
The migration from the old compression algorithm to the new algorithm is, by definition, imperfect since there is no way to change old images or old primitives. However, with a little care there should be no problem.
Note:
In the following table, old means from an 8.6.1 or earlier release while new means from an 8.6.2 or newer release. Also, library access primitives means emntv50.dll and emsrv50.dll (Windows) or libemntv50.so and libemsrv50.so (UNIX).
 
 
 
 
Library contains only V1 compressed source
Library contains both V1 and V2 compressed source
Old image; Old library access primitives
Source is compressed as V1.
V1 compressed source is decompressed
Source is compressed as V1.
V1 compressed source is decompressed; V2 compressed source is either not decompressed, is corrupted during decompression, or causes an exception (depending on the content)
Old image; New library access primitives
Source is compressed as V1.
V1 compressed source is decompressed
Source is compressed as V1.
V1 and V2 compressed source is decompressed
New image; New library access primitives
Source is compressed as V2.
V1 and V2 compressed source is decompressed
Source is compressed as V2. .
1 and V2 compressed source is decompressed
New image; Old library access primitives
Source is compressed as V2.
V1 compressed source is decompressed; V2 compressed source is either not decompressed, is corrupted during decompression, or causes an exception (depending on the content)
Source is compressed as V2.
V1 compressed source is decompressed; V2 compressed source is either not decompressed, is corrupted during decompression, or causes an exception (depending on the content)
Looking at the table, you can discern that old library primitives should never be used when accessing a library containing V2 compressed source code. However, since the issue only manifests itself during decompression, there is no damage to the content of the library if old library access primitives are used. To help remind you of this, new images will report a warning on the Transcript when they start if they are connected to the library using old library primitives.
Last modified date: 05/13/2020