from typing import Set
import itertools


def _get_features(content: bytes) -> Set[int]:
    """
    Extract unique byte uni-grams and bi-grams

    Args:
        content: Encoded text

    Returns:
        Set of integers that represent byte n-grams
    """
    pairs = zip(content, itertools.islice(content, 1, None))
    return set(content).union(x * 256 + y for x, y in pairs)