-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
129 additions
and
38 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | ||
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
.\" | ||
.TH "ZIP_SOURCE_FILE" "3" "December 18, 2017" "NiH" "Library Functions Manual" | ||
.TH "ZIP_SOURCE_FILE" "3" "June 30, 2023" "NiH" "Library Functions Manual" | ||
.nh | ||
.if n .ad l | ||
.SH "NAME" | ||
|
@@ -68,11 +68,39 @@ and read | |
bytes from offset | ||
\fIstart\fR | ||
from it. | ||
If | ||
\fIlen\fR | ||
is 0 or \-1, the whole file (starting from | ||
\fIstart\fR) | ||
is used. | ||
.PP | ||
When passing | ||
\fRZIP_LENGTH_TO_END\fR | ||
(or \-1, which is deprecated) as | ||
\fIlen\fR, | ||
\fBzip_source_file\fR | ||
determines the file size when it is called and uses that as the | ||
expected file size. | ||
If the file size grows between creating and reading from the source, | ||
the additional data is ignored. | ||
If the file shrinks, | ||
\fBlibzip\fR | ||
treats it as an error | ||
(\fRZIP_ER_DATA_LENGTH\fR). | ||
.PP | ||
When passing | ||
\fRZIP_LENGTH_UNCHECKED\fR | ||
as | ||
\fIlen\fR, | ||
\fBzip_source_file\fR | ||
assumes the file's size is unknown. | ||
Reading from the source returns as much data as is there at that time | ||
(usually when calling | ||
zip_close(3)). | ||
.PP | ||
\fBlibzip\fR | ||
can do various optimizations if the size of a source is known when | ||
it's created, so | ||
\fRZIP_LENGTH_TO_END\fR | ||
is preferrable. | ||
If you deal with files that are likely to change while you are | ||
processing them, you can use the less efficient | ||
\fRZIP_LENGTH_UNCHECKED\fR. | ||
.PP | ||
If the file supports seek, the source can be used to open a zip archive from. | ||
.PP | ||
|
@@ -119,6 +147,11 @@ zip_source(3) | |
and | ||
\fBzip_source_file_create\fR() | ||
were added in libzip 1.0. | ||
.PP | ||
\fRZIP_LENGTH_TO_END\fR | ||
and | ||
\fRZIP_LENGTH_UNCHECKED\fR | ||
were added in libzip 1.10.1. | ||
.SH "AUTHORS" | ||
Dieter Baron <\fI[email protected]\fR> | ||
and | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | ||
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
.\" | ||
.TH "ZIP_SOURCE_FILEP" "3" "December 18, 2017" "NiH" "Library Functions Manual" | ||
.TH "ZIP_SOURCE_FILEP" "3" "June 30, 2023" "NiH" "Library Functions Manual" | ||
.nh | ||
.if n .ad l | ||
.SH "NAME" | ||
|
@@ -67,11 +67,10 @@ bytes from offset | |
\fIstart\fR | ||
from the open file stream | ||
\fIfile\fR. | ||
If | ||
For a description of the | ||
\fIlen\fR | ||
is 0 or \-1, the whole file (starting from | ||
\fIstart\fR) | ||
is used. | ||
argument, see | ||
zip_source_file(3). | ||
.PP | ||
If the file stream supports seeking, the source can be used to open | ||
a read-only zip archive from. | ||
|
@@ -105,12 +104,18 @@ Required memory could not be allocated. | |
libzip(3), | ||
zip_file_add(3), | ||
zip_file_replace(3), | ||
zip_source(3) | ||
zip_source(3), | ||
zip_source_file(3) | ||
.SH "HISTORY" | ||
\fBzip_source_filep\fR() | ||
and | ||
\fBzip_source_filep_create\fR() | ||
were added in libzip 1.0. | ||
.PP | ||
\fRZIP_LENGTH_TO_END\fR | ||
and | ||
\fRZIP_LENGTH_UNCHECKED\fR | ||
were added in libzip 1.10.1. | ||
.SH "AUTHORS" | ||
Dieter Baron <\fI[email protected]\fR> | ||
and | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | ||
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
.\" | ||
.TH "ZIP_SOURCE_WIN32A" "3" "December 18, 2017" "NiH" "Library Functions Manual" | ||
.TH "ZIP_SOURCE_WIN32A" "3" "June 30, 2023" "NiH" "Library Functions Manual" | ||
.nh | ||
.if n .ad l | ||
.SH "NAME" | ||
|
@@ -68,11 +68,10 @@ and read | |
bytes from offset | ||
\fIstart\fR | ||
from it. | ||
If | ||
For a description of the | ||
\fIlen\fR | ||
is 0 or \-1, the whole file (starting from | ||
\fIstart\fR) | ||
is used. | ||
argument, see | ||
zip_source_file(3). | ||
.PP | ||
If the file supports seek, the source can be used to open a zip archive from. | ||
.PP | ||
|
@@ -114,13 +113,19 @@ libzip(3), | |
zip_file_add(3), | ||
zip_file_replace(3), | ||
zip_source(3), | ||
zip_source_file(3), | ||
zip_source_win32handle(3), | ||
zip_source_win32w(3) | ||
.SH "HISTORY" | ||
\fBzip_source_win32a\fR() | ||
and | ||
\fBzip_source_win32a_create\fR() | ||
were added in libzip 1.0. | ||
.PP | ||
\fRZIP_LENGTH_TO_END\fR | ||
and | ||
\fRZIP_LENGTH_UNCHECKED\fR | ||
were added in libzip 1.10.1. | ||
.SH "AUTHORS" | ||
Dieter Baron <\fI[email protected]\fR> | ||
and | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.