Skip to content

Commit 8dddc52

Browse files
committed
add README and LICENSE
1 parent 376e418 commit 8dddc52

2 files changed

Lines changed: 100 additions & 0 deletions

File tree

LICENSE

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
MIT License
2+
3+
Copyright (c) <2022> Demin Yin <deminy@deminy.net>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
22+
Developer’s Certificate of Origin 1.1
23+
24+
By making a contribution to this project, I certify that:
25+
26+
(a) The contribution was created in whole or in part by me and I
27+
have the right to submit it under the open source license
28+
indicated in the file; or
29+
30+
(b) The contribution is based upon previous work that, to the best
31+
of my knowledge, is covered under an appropriate open source
32+
license and I have the right under that license to submit that
33+
work with modifications, whether created in whole or in part
34+
by me, under the same open source license (unless I am
35+
permitted to submit under a different license), as indicated
36+
in the file; or
37+
38+
(c) The contribution was provided directly to me by some other
39+
person who certified (a), (b) or (c) and I have not modified
40+
it.
41+
42+
(d) I understand and agree that this project and the contribution
43+
are public and that a record of the contribution (including all
44+
personal information I submit with it, including my sign-off) is
45+
maintained indefinitely and may be redistributed consistent with
46+
this project or the open source license(s) involved.

README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# php-bsdiff
2+
3+
`bsdiff` is a PHP extension to build and apply patches to binary files.
4+
5+
This PHP extension is based on [the bsdiff and bspatch libraries][1] maintained by Matthew Endsley. The original algorithm
6+
and implementation was developed by Colin Percival. The algorithm is detailed in Colin's paper, [Naïve Differences of Executable Code][1].
7+
For more information, visit his website at <http://www.daemonology.net/bsdiff/>.
8+
9+
---
10+
11+
## Requirements
12+
13+
* PHP 8.x
14+
15+
## Installation
16+
17+
```bash
18+
phpize
19+
./configure
20+
make
21+
make test # optional
22+
make install
23+
```
24+
25+
Once done, add the following line to your `php.ini` file:
26+
27+
```ini
28+
extension=bsdiff.so
29+
```
30+
31+
## Functions
32+
33+
There are two PHP functions added by the extension:
34+
35+
```php
36+
/**
37+
* @throws \BsdiffException If there is any error happens.
38+
*/
39+
function bsdiff_diff(string $old_file, string $new_file, string $diff_file): void {}
40+
41+
/**
42+
* @throws \BsdiffException If there is any error happens.
43+
*/
44+
function bsdiff_patch(string $old_file, string $new_file, string $diff_file): void {}
45+
```
46+
47+
---
48+
49+
## License
50+
51+
MIT license.
52+
53+
[1]: https://github.com/mendsley/bsdiff
54+
[2]: http://www.daemonology.net/papers/bsdiff.pdf

0 commit comments

Comments
 (0)