Learn R Programming

freesurferformats (version 1.1.0)

open.maybe.gzip: Open a connection that transparently handles gzip compression.

Description

Open a connection that transparently handles gzip compression.

Usage

# S3 method for maybe.gzip
open(filepath, gzipped, mode = "rb")

Value

a connection, call close() on it when done.

Arguments

filepath

character string, path to the file.

gzipped

logical, whether the file is gzip-compressed (see is.gzip.file).

mode

character string, 'r' for text or 'rb' for binary.