public static function bit64(string $data, int $offset = 0, bool $endianness = false): int
    {
        // big-endian
        if (true === $endianness) {
            return unpack('J', $data, $offset)[1];
        }

        // little-endian
        if (false === $endianness) {
            return unpack('P', $data, $offset)[1];
        }

        // machine byte order
        if (null === $endianness) {
            return unpack('Q', $data, $offset)[1];
        }
    }