   private let _writeFunc: (Data?) throws -> ()
   private var _finalized: Bool = false
 
-  /**
-   Initialize an output filter
-
-   - Parameters:
-   - operation: direction of operation
-   - algorithm: compression algorithm
-   - bufferCapacity: capacity of the internal data buffer
-   - writeFunc: called to write the processed data
-
-   - Throws: `FilterError.StreamInitError` if stream initialization failed
-   */
+  /// Initialize an output filter
+  ///
+  /// - Parameters:
+  /// - operation: direction of operation
+  /// - algorithm: compression algorithm
+  /// - bufferCapacity: capacity of the internal data buffer
+  /// - writeFunc: called to write the processed data
+  ///
+  /// - Throws: `FilterError.StreamInitError` if stream initialization failed
   public init(
     _ operation: FilterOperation,
     using algorithm: Algorithm,

import Foundation
@_exported import Compression

/**
 Compression algorithms, wraps the C API constants.
 */
public enum Algorithm: CaseIterable {

  /// LZFSE

@available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
extension compression_stream {

  /// Initialize a compression_stream struct
  ///
  /// - Parameter operation: direction of operation
  /// - Parameter algorithm: compression algorithm
  ///
  /// - Throws: `FilterError.filterInitError` if `algorithm` is not supported
  ///           by the Compression stream API
  ///
  internal init(operation: FilterOperation, algorithm: Algorithm) throws {
    self.init(dst_ptr: UnsafeMutablePointer<UInt8>.allocate(capacity:0),
              dst_size: 0,
              src_ptr: UnsafeMutablePointer<UInt8>.allocate(capacity:0),
