---
name: "zip_stat_init"
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_stat_init"
---

# zip\_stat\_init(3)

initialize zip\_stat structure

## NAME

**zip\_stat\_init** – initialize zip\_stat structure

## LIBRARY

libzip (-lzip)

## SYNOPSIS

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

*void*\

**zip\_stat\_init**(*zip\_stat\_t \*sb*);

## DESCRIPTION

The **zip\_stat\_init**() function initializes the members of a struct zip\_stat. The current members are described in [zip\_stat(3)](/zip_stat/3.md), but this function should be used to initialize it to make sure none are missed. The structure pointed to by *sb* must be allocated before calling **zip\_stat\_init**().

This function should be used by functions provided to [zip\_source\_function(3)](/zip_source_function/3.md) when returning ZIP\_SOURCE\_STAT information to make sure all fields are initialized.

## RETURN VALUES

If *sb* is valid, the function is always successful.

## SEE ALSO

[libzip(3)](/libzip/3.md), [zip\_stat(3)](/zip_stat/3.md)

## HISTORY

**zip\_stat\_init**() was added in libzip 0.8.

## AUTHORS

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