提交 b8522e02 编写于 作者: M Mark Adler

Add note to contrib/blast to use binary mode in stdio.

上级 e69a9cee
/* blast.c /* blast.c
* Copyright (C) 2003 Mark Adler * Copyright (C) 2003, 2012 Mark Adler
* For conditions of distribution and use, see copyright notice in blast.h * For conditions of distribution and use, see copyright notice in blast.h
* version 1.1, 16 Feb 2003 * version 1.2, 24 Oct 2012
* *
* blast.c decompresses data compressed by the PKWare Compression Library. * blast.c decompresses data compressed by the PKWare Compression Library.
* This function provides functionality similar to the explode() function of * This function provides functionality similar to the explode() function of
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
* *
* 1.0 12 Feb 2003 - First version * 1.0 12 Feb 2003 - First version
* 1.1 16 Feb 2003 - Fixed distance check for > 4 GB uncompressed data * 1.1 16 Feb 2003 - Fixed distance check for > 4 GB uncompressed data
* 1.2 24 Oct 2012 - Add note about using binary mode in stdio
*/ */
#include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */ #include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */
......
/* blast.h -- interface for blast.c /* blast.h -- interface for blast.c
Copyright (C) 2003 Mark Adler Copyright (C) 2003, 2012 Mark Adler
version 1.1, 16 Feb 2003 version 1.2, 24 Oct 2012
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any damages warranty. In no event will the author be held liable for any damages
...@@ -28,6 +28,10 @@ ...@@ -28,6 +28,10 @@
* that library. (Note: PKWare overused the "implode" verb, and the format * that library. (Note: PKWare overused the "implode" verb, and the format
* used by their library implode() function is completely different and * used by their library implode() function is completely different and
* incompatible with the implode compression method supported by PKZIP.) * incompatible with the implode compression method supported by PKZIP.)
*
* The binary mode for stdio functions should be used to assure that the
* compressed data is not corrupted when read or written. For example:
* fopen(..., "rb") and fopen(..., "wb").
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册