   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

  private var _eofReached: Bool = false // did we read end-of-file from the input?
  private var _endReached: Bool = false // did we reach end-of-file from the decoder stream?

  /// Initialize an input filter
  ///
  /// - Parameters:
  /// - operation: direction of operation
  /// - algorithm: compression algorithm
  /// - bufferCapacity: capacity of the internal data buffer
  /// - readFunc: called to read the input data
  ///
  /// - Throws: `FilterError.filterInitError` if filter initialization failed
  public init(
    _ operation: FilterOperation,
    using algorithm: Algorithm,
