Functions | |
CURLcode | urlFetchData (URL_t *URL) |
size_t | url_fread (void *obuf, size_t obufSize, URL_t *URL) |
size_t | urlRead (URL_t *URL, void *buf, size_t bufSize) |
Reads data into the given buffer. More... | |
CURLcode | urlSeek (URL_t *URL, size_t pos) |
Seeks to a given position in a local or remote file. More... | |
URL_t * | urlOpen (char *fname) |
void | urlClose (URL_t *URL) |
int | bwSetPos (bigWigFile_t *fp, size_t pos) |
size_t | bwRead (void *data, size_t sz, size_t nmemb, bigWigFile_t *fp) |
void | bwClose (bigWigFile_t *fp) |
int | bwInit (size_t defaultBufSize, int nFetchIterations, unsigned int nSeconds) |
void | bwCleanup () |
void bwCleanup | ( | ) |
void bwClose | ( | bigWigFile_t * | fp | ) |
int bwInit | ( | size_t | defaultBufSize, |
int | nFetchIterations, | ||
unsigned int | nSeconds | ||
) |
size_t bwRead | ( | void * | data, |
size_t | sz, | ||
size_t | nmemb, | ||
bigWigFile_t * | fp | ||
) |
int bwSetPos | ( | bigWigFile_t * | fp, |
size_t | pos | ||
) |
size_t url_fread | ( | void * | obuf, |
size_t | obufSize, | ||
URL_t * | URL | ||
) |
void urlClose | ( | URL_t * | URL | ) |
CURLcode urlFetchData | ( | URL_t * | URL | ) |
URL_t* urlOpen | ( | char * | fname | ) |
size_t urlRead | ( | URL_t * | URL, |
void * | buf, | ||
size_t | bufSize | ||
) |
Reads data into the given buffer.
This function will store bufSize data into buf for both local and remote files. For remote files an internal buffer is used to store a (typically larger) segment of the remote file.
URL | A URL_t * pointing to a valid opened file or remote URL. |
buf | The buffer in memory that you would like filled. It must be able to hold bufSize bytes! |
bufSize | The number of bytes to transfer to buf. |
CURLcode urlSeek | ( | URL_t * | URL, |
size_t | pos | ||
) |
Seeks to a given position in a local or remote file.
For local files, this will set the file position indicator for the file pointer to the desired position. For remote files, it sets the position to start downloading data for the next urlRead(). Note that for remote files that running urlSeek() with a pos within the current buffer will simply modify the internal offset.