1*a3a45f30SXin Li.\"- 2*a3a45f30SXin Li.\" Copyright 2003-2005 Colin Percival 3*a3a45f30SXin Li.\" All rights reserved 4*a3a45f30SXin Li.\" 5*a3a45f30SXin Li.\" Redistribution and use in source and binary forms, with or without 6*a3a45f30SXin Li.\" modification, are permitted providing that the following conditions 7*a3a45f30SXin Li.\" are met: 8*a3a45f30SXin Li.\" 1. Redistributions of source code must retain the above copyright 9*a3a45f30SXin Li.\" notice, this list of conditions and the following disclaimer. 10*a3a45f30SXin Li.\" 2. Redistributions in binary form must reproduce the above copyright 11*a3a45f30SXin Li.\" notice, this list of conditions and the following disclaimer in the 12*a3a45f30SXin Li.\" documentation and/or other materials provided with the distribution. 13*a3a45f30SXin Li.\" 14*a3a45f30SXin Li.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15*a3a45f30SXin Li.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16*a3a45f30SXin Li.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17*a3a45f30SXin Li.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 18*a3a45f30SXin Li.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19*a3a45f30SXin Li.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20*a3a45f30SXin Li.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21*a3a45f30SXin Li.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 22*a3a45f30SXin Li.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 23*a3a45f30SXin Li.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24*a3a45f30SXin Li.\" POSSIBILITY OF SUCH DAMAGE. 25*a3a45f30SXin Li.\" 26*a3a45f30SXin Li.\" $FreeBSD: src/usr.bin/bsdiff/bspatch/bspatch.1,v 1.1 2005/08/06 01:59:06 cperciva Exp $ 27*a3a45f30SXin Li.\" 28*a3a45f30SXin Li.Dd May 18, 2003 29*a3a45f30SXin Li.Dt BSPATCH 1 30*a3a45f30SXin Li.Os FreeBSD 31*a3a45f30SXin Li.Sh NAME 32*a3a45f30SXin Li.Nm bspatch 33*a3a45f30SXin Li.Nd apply a patch built with bsdiff(1) 34*a3a45f30SXin Li.Sh SYNOPSIS 35*a3a45f30SXin Li.Nm 36*a3a45f30SXin Li.Ar oldfile newfile patchfile 37*a3a45f30SXin Li.Op Ar old-extents new-extents 38*a3a45f30SXin Li.Sh DESCRIPTION 39*a3a45f30SXin Li.Nm 40*a3a45f30SXin Ligenerates 41*a3a45f30SXin Li.Ar newfile 42*a3a45f30SXin Lifrom 43*a3a45f30SXin Li.Ar oldfile 44*a3a45f30SXin Liand 45*a3a45f30SXin Li.Ar patchfile , 46*a3a45f30SXin Liwhere 47*a3a45f30SXin Li.Ar patchfile 48*a3a45f30SXin Liis a binary patch built by 49*a3a45f30SXin Li.Xr bsdiff 1 . 50*a3a45f30SXin Li.Pp 51*a3a45f30SXin LiWhen provided, 52*a3a45f30SXin Li.Ar old-extents 53*a3a45f30SXin Liand 54*a3a45f30SXin Li.Ar new-extents 55*a3a45f30SXin Liinstruct 56*a3a45f30SXin Li.Nm 57*a3a45f30SXin Lito read specific chunks of data from the old file and to write to specific 58*a3a45f30SXin Lilocations in the new file, respectively. Each is a comma-separated list of 59*a3a45f30SXin Liextents of the form 60*a3a45f30SXin Li.Ar offset : Ns Ar length , 61*a3a45f30SXin Liwhere 62*a3a45f30SXin Li.Ar offset 63*a3a45f30SXin Liis either -1 or a non-negative integer and 64*a3a45f30SXin Li.Ar length 65*a3a45f30SXin Liis a positive integer. An offset value of -1 denotes a sparse extent, namely a 66*a3a45f30SXin Lisequence of zeros that entails neither reading nor writing of actual file 67*a3a45f30SXin Licontent. 68*a3a45f30SXin Li.Pp 69*a3a45f30SXin Li.Nm 70*a3a45f30SXin Liuses memory equal to the size of 71*a3a45f30SXin Li.Ar newfile , 72*a3a45f30SXin Libut can tolerate a very small working set without a dramatic loss 73*a3a45f30SXin Liof performance. 74*a3a45f30SXin Li.Sh SEE ALSO 75*a3a45f30SXin Li.Xr bsdiff 1 76*a3a45f30SXin Li.Sh AUTHORS 77*a3a45f30SXin Li.An Colin Percival Aq [email protected] 78