asn1tinydecoder.py is a simple and fast ASN.1 decoder without external
libraries designed to parse large files.
A widely used library for encoding and decoding ASN.1 in python is Pyasn1. This implementation covers many aspects of ASN.1, but the API is very complex and hard to learn. Furthermore Pyasn1 is not designed to parse large files. This why I wrote this tiny ASN.1 decoder. It’s design goal was to be as fast as possible (with Python 2)1.
A practical application can be found in
program creates an index allowing fast search in big ASN.1 data structures.
All python scripts including sample data to parse can be downloaded here.
The source code is hosted on Github https://github.com/getreu/asn1-tiny-decoder.
Python 3 would have been a better choice for
because of its
bytes type. Any volunteer for porting it Python 3?