import gzip
import json


def load_gzipped_jsonl(filename: str, encoding: str = 'UTF-8') -> dict:
    """
    Function loads data stored in gzipped JSON Lines.

    Parameters
    ----------
    filename : str
               Path to the file.

    encoding : str, default = 'utf-8'

    Returns
    -------
    : dict
        Python dictionary with unique records.
    """

    datadict = {}

    with gzip.open(filename, 'rt', encoding=encoding) as fstream:
        for fline in fstream:
            datadict.update(json.loads(fline))

    return datadict