.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd November 6, 2017
+.Dd December 18, 2017
.Dt ZIP_SOURCE_FUNCTION 3
.Os
.Sh NAME
-.Nm zip_source_function
+.Nm zip_source_function ,
+.Nm zip_source_function_create
.Nd create data source from function
.Sh LIBRARY
libzip (-lzip)
.Ss Dv ZIP_SOURCE_BEGIN_WRITE
Prepare the source for writing.
Use this to create any temporary file(s).
+.Ss Dv ZIP_SOURCE_BEGIN_WRITE_CLONING
+Prepare the source for writing, keeping the first
+.Ar len
+bytes of the original file.
+Only implement this command if it is more efficient than copying the
+data, and if it does not destructively overwrite the original file
+(you still have to be able to execute
+.Dv ZIP_SOURCE_ROLLBACK_WRITE ) .
+.Pp
+The next write should happen at byte
+.Ar offset .
.Ss Dv ZIP_SOURCE_CLOSE
Reading is done.
.Ss Dv ZIP_SOURCE_COMMIT_WRITE
return \-1.
.Pp
.Dv ZIP_SOURCE_BEGIN_WRITE
+or
+.Dv ZIP_SOURCE_BEGIN_WRITE_CLONING
will be called before
.Dv ZIP_SOURCE_WRITE ,
.Dv ZIP_SOURCE_SEEK_WRITE ,
.Dv ZIP_SOURCE_FREE ,
and similarly for
.Dv ZIP_SOURCE_BEGIN_WRITE
+or
+.Dv ZIP_SOURCE_BEGIN_WRITE_CLONING
and
.Dv ZIP_SOURCE_COMMIT_WRITE
or
.Xr zip_replace 3 ,
.Xr zip_source 3 ,
.Xr zip_stat_init 3
+.Sh HISTORY
+.Fn zip_source_function
+and
+.Fn zip_source_function_create
+were added in libzip 1.0.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at