<commit_before>// Copyright (c) 2017 <NAME>
// Licensed under MIT License
//
// See LICENSE for license information

import Foundation

/// A type that represents an archive.
public protocol Archive {

    /// Unarchive data from the archive.
    static func unarchive(archive: Data) throws -> Data

}

/// A type that provides an implementation of a particular decompression algorithm.
public protocol DecompressionAlgorithm {

    /// Decompress data compressed with particular algorithm.
    static func decompress(data: Data) throws -> Data

}

/// A type that represents a container of files, directories and/or other data.
public protocol Container {

    /// Retrieve all the entries from the container.
    static func open(container: Data) throws -> [ContainerEntry]

}

/// A type that represents an entry from a container (file or directory) with attributes.
public protocol ContainerEntry {

    /// Retrieve name of the entry from the container.
    var name: String { get }

    /// Retrieve size of the entry's data from the container.<commit_msg>Add CompressionAlgorithm protocol<commit_after>// Copyright (c) 2017 <NAME>
// Licensed under MIT License
//
// See LICENSE for license information

import Foundation

/// A type that represents an archive.
public protocol Archive {

    /// Unarchive data from the archive.
    static func unarchive(archive: Data) throws -> Data

}

/// A type that provides an implementation of a particular decompression algorithm.
public protocol DecompressionAlgorithm {

    /// Decompress data compressed with particular algorithm.
    static func decompress(data: Data) throws -> Data

}

/// A type that provides an implementation of a particular compression algorithm.
public protocol CompressionAlgorithm {
    
    /// Cmpress data with particular algorithm.
    static func compress(data: Data) throws -> Data
    
}

/// A type that represents a container of files, directories and/or other data.
public protocol Container {

    /// Retrieve all the entries from the container.
    static func open(container: Data) throws -> [ContainerEntry]

}

/// A type that represents an entry from a container (file or directory) with attributes.
public protocol ContainerEntry {

    /// Retrieve name of the entry from the container.
    var name: String { get }

    /// Retrieve size of the entry's data from the container.
{'fraction_non_alphanumeric': 0.07611438183347351, 'fraction_numerical': 0.00336417157275021, 'mean_word_length': 3.2710951526032317, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '201411', 'n_tokens_mistral': 578, 'n_tokens_neox': 551, 'n_words': 282}