79780235

Date: 2025-10-01 15:31:26
Score: 0.5
Natty:
Report link

(Wait for completion... pre-submitted) I use the following approach because my program was replacing a C program, which is naturally faster than Python, so I was looking for ways to optimize this operation. It's very similar to @zeitghaist's answer, but with a couple differences.

encodedData = None
dataLength = 0

with open(self.inputDataFilePath, 'rb') as inputDataFile:
    encodedData = inputDataFile.read()
    dataLength = len(encodedData)

asn1Decoder = asn1tools.compile_files(schemaFilePaths, codec) #BER in my case
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @zeitghaist's
  • Low reputation (0.5):
Posted by: Troy Niemeier