PySmaz a Pure Python Small-String Compression Library Ported from SMAZ

PySmaz is a pure python port of the SMAZ small string compression library originally developed by Salvatore Sanfilippo. I thought I’d just jot down a few notes about the experience of porting the library from C to Python. In particular the challenges around optimizing both the absolute compression ratio of the algorithm, ensuring throughput is acceptable for its intended use, while preventing the code from descending into an unreadable mess.

Continue reading

Python: Pulling Apart IEEE Floats for Decimal conversion

While attempting to convert floats precisely to Decimals the other day I was caught out by the fact that Python 2.6’s print function defers to whatever the underlying C compiler’s printf function does. This meant that on Linux I got one result when I asked for ‘%.31f’ % math.pi, and on Windows – something completely different. This lack of portability is a pain, and I had to work around it.

Continue reading

20000 Leagues Under the Sea - title

20,000 Leagues Under The Sea – iTunes HD Review

20,000 Leagues Under The Sea is a classic Jules Verne novel, adapted by Disney into the 1954 feature film, staring Kirk Douglas, James Mason, Paul Lukas and Peter Lorre, directed by Richard Fleischer and written by Earl Fenton. Since the film is not on Blu-ray yet (note: in 2019 Disney Movie Club released a Blu-ray version of this movie – I’ll cover this at the end), and has apparently undergone a restoration at 4k, I thought I’d take a look at the 1080p iTunes HD version that appears to be the new restored version. Continue reading