compression: File compression

compressionR Documentation

File compression

Description

Methods and generics for file compression strategies.

Usage

decompress(manager, con, ...)

## S4 method for signature 'ANY'
decompress(manager, con, ...)

## S4 method for signature 'CompressedFile'
decompress(manager, con, ...)

## S4 method for signature 'character'
decompress(manager, con, ...)

## S4 method for signature 'CompressedFile'
fileFormat(x)

Arguments

manager

The connection manager, defaults to the internal manager class

con

The connection from which data is loaded or to which data is saved. If this is a character vector, it is assumed to be a file name and a corresponding file connection is created and then closed after exporting the object. If it is a BiocFile derivative, the data is loaded from or saved to the underlying resource. If missing, the function will return the output as a character vector, rather than writing to a connection.

...

Parameters to pass to the format-specific method.

x

A BiocFile instance

Value

A decompressed representation of a CompressedFile or character object

Related functions

FileForFormat(path, format = file_ext(path))

Determines the file type of path and returns a high-level file object such as BamFile, BEDFile, BigWigFile, etc.

Examples

file <- tempfile(fileext = ".gzip")
decompress(con = file)


Bioconductor/BiocIO documentation built on April 28, 2024, 7:43 a.m.