---
name: "zip_fseek"
section: "3"
platform: "linux"
package: "libzip"
version: "1.11.4-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/zip_fseek"
---

# zip\_fseek(3)

seek in file

## NAME

**zip\_fseek**, **zip\_file\_is\_seekable** – seek in file

## LIBRARY

libzip (-lzip)

## SYNOPSIS

**#include \<zip.h\>**

*zip\_int8\_t*\

**zip\_fseek**(*zip\_file\_t \*file*, *zip\_int64\_t offset*, *int whence*);

*int*\

**zip\_file\_is\_seekable**(*zip\_file\_t \*file*);

## DESCRIPTION

The **zip\_fseek**() function seeks to the specified *offset* relative to *whence*, just like [fseek(3)](/fseek/3.md).

**zip\_fseek** only works on uncompressed (stored), unencrypted data. When called on compressed or encrypted data it will return an error.

The **zip\_file\_is\_seekable**() function returns 1 if a file is seekable.

## RETURN VALUES

If successful, **zip\_fseek**() returns 0. Otherwise, -1 is returned.

**zip\_file\_is\_seekable**() returns 1 if a file is seekable and 0 if not. On an invalid argument, it returns -1.

## SEE ALSO

[libzip(3)](/libzip/3.md), [zip\_fclose(3)](/zip_fclose/3.md), [zip\_file\_get\_error(3)](/zip_file_get_error/3.md), [zip\_fopen(3)](/zip_fopen/3.md), [zip\_fread(3)](/zip_fread/3.md), [zip\_ftell(3)](/zip_ftell/3.md)

## HISTORY

**zip\_fseek**() was added in libzip 1.2.0. **zip\_file\_is\_seekable**() was added in libzip 1.9.0.

## AUTHORS

Dieter Baron ⟨*dillo@nih.at*⟩ and Thomas Klausner ⟨*wiz@gatalith.at*⟩
