libgunshotmatch.gzip_util

Read and write gzipped JSON.

Functions:

read_gzip_json(path)

Load JSON from a gzipped file.

write_gzip_json(path, data[, indent, mtime])

Write JSON to a gzip file.

read_gzip_json(path)[source]

Load JSON from a gzipped file.

Parameters

path (Union[str, Path, PathLike]) – The filename to read from.

Return type

Union[str, int, float, bool, None, Dict[str, Any], List[Any]]

Returns

The loaded JSON content.

write_gzip_json(path, data, indent=2, mtime=0)[source]

Write JSON to a gzip file.

Parameters

Changed in version 0.12.0: Added mtime argument.