Archive constructor

Archive(
  1. CompressionRsWorld _world
)

Implementation

Archive(this._world)
  : _writeArchive = _world.library.getComponentFunctionWorker(
      'compression-rs-namespace:compression-rs/archive#write-archive',
      const FuncType(
        [('input', ArchiveInput._spec), ('output-path', StringType())],
        [('', ResultType(null, StringType()))],
      ),
    )!,
    _createArchive = _world.library.getComponentFunctionWorker(
      'compression-rs-namespace:compression-rs/archive#create-archive',
      const FuncType(
        [('input', ArchiveInput._spec)],
        [('', ResultType(ListType(U8()), StringType()))],
      ),
    )!,
    _readTar = _world.library.getComponentFunctionWorker(
      'compression-rs-namespace:compression-rs/archive#read-tar',
      const FuncType(
        [('path', StringType())],
        [('', ResultType(ListType(TarFile._spec), StringType()))],
      ),
    )!,
    _viewTar = _world.library.getComponentFunctionWorker(
      'compression-rs-namespace:compression-rs/archive#view-tar',
      const FuncType(
        [('tar-bytes', ListType(U8()))],
        [('', ResultType(ListType(TarFile._spec), StringType()))],
      ),
    )!,
    _readZip = _world.library.getComponentFunctionWorker(
      'compression-rs-namespace:compression-rs/archive#read-zip',
      const FuncType(
        [('path', StringType())],
        [('', ResultType(ListType(ZipFile._spec), StringType()))],
      ),
    )!,
    _viewZip = _world.library.getComponentFunctionWorker(
      'compression-rs-namespace:compression-rs/archive#view-zip',
      const FuncType(
        [('zip-bytes', ListType(U8()))],
        [('', ResultType(ListType(ZipFile._spec), StringType()))],
      ),
    )!,
    _extractZip = _world.library.getComponentFunctionWorker(
      'compression-rs-namespace:compression-rs/archive#extract-zip',
      const FuncType(
        [('zip', Input._spec), ('path', StringType())],
        [('', ResultType(null, StringType()))],
      ),
    )!,
    _extractTar = _world.library.getComponentFunctionWorker(
      'compression-rs-namespace:compression-rs/archive#extract-tar',
      const FuncType(
        [('tar', Input._spec), ('path', StringType())],
        [('', ResultType(null, StringType()))],
      ),
    )!;