Skip to main content

This is a python library that deals with lzo files compressed with lzop.

Project description

##A simple and sometimes naive python lzo library.

This is a python library deals with lzo files compressed with lzop. There is a python-lzo module in github, but it's for compressing strings using lzo. This module is for lzop generate file. It parses the header structures and check the checksum.

One possible usage is unpack Android(linux) kernel boot.img. And actually it's why I create this ugly module.

##Usage## You can use it as command line tools:

python minilzo.py file_to_compress

Or import it into your script

import minilzo
f = minilzo.open('compressed.lzo', 'wb')
data = #some data
f.write(data)

Open boot.img:

from minilzo import LzoFile
f = open('boot.img', 'rb')
f.seek(#calculate your offset)
LzoFile(fileobj=f, mode = 'rb')

Known issues: crc32 checksum not supported, because no such function in minilzo library filter not supported, but version number not current path name not supported mtime read but not set

TODO: check if liblzo presents. Use it if so, otherwise use builtin minilzo figure out why signature check fails like lzop does

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

minilzo-1.1.tar.gz (76.6 kB view details)

Uploaded Source

File details

Details for the file minilzo-1.1.tar.gz.

File metadata

  • Download URL: minilzo-1.1.tar.gz
  • Upload date:
  • Size: 76.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for minilzo-1.1.tar.gz
Algorithm Hash digest
SHA256 2c40dbf2be1cb7931e00978d5e31c44e6f0cb02eb3e3e8770ea0371dc955196b
MD5 aa66e97978e54a6f13fae6eac2340bf3
BLAKE2b-256 23e16832a74ded66d5a783ee19fcf6de23accadc3ba4273974cbcbc3aff98349

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page