Decoders

mpacklog.decode.decode(path, chunk_size=100000)

Read dictionaries in series from a log file.

Parameters:
  • path (str) – Path to the log file to read.

  • chunk_size (int) – Optional, number of bytes to read per internal loop cycle.

Return type:

Generator[dict, None, None]

Returns:

Generator to each dictionary from the log file, in sequence.

mpacklog.delta_decode.delta_decode(path, chunk_size=100000)

Read dictionaries from a delta-encoded log file.

Parameters:
  • path (str) – Path to the delta-encoded log file to read.

  • chunk_size (int) – Optional, number of bytes to read per internal loop cycle.

Return type:

Generator[dict, None, None]

Returns:

Generator to each cumulative dictionary from the log file, in sequence. Each yielded dictionary is cumulatively updated with all previous deltas.