From 5b5251b7ce7330e73bd55cf105dadcf80fc08f39 Mon Sep 17 00:00:00 2001 From: cxl Date: Sun, 15 Apr 2012 15:57:40 +0000 Subject: [PATCH] Core: z.h docs git-svn-id: svn://ultimatepp.org/upp/trunk@4788 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/src.tpp/Zlib$en-us.tpp | 73 ++++++++++++++++++++++++++++++ uppsrc/Core/z.h | 16 +++---- 2 files changed, 80 insertions(+), 9 deletions(-) diff --git a/uppsrc/Core/src.tpp/Zlib$en-us.tpp b/uppsrc/Core/src.tpp/Zlib$en-us.tpp index ab1b1334b..aecbbf921 100644 --- a/uppsrc/Core/src.tpp/Zlib$en-us.tpp +++ b/uppsrc/Core/src.tpp/Zlib$en-us.tpp @@ -124,4 +124,77 @@ in single zlib call.&] [s4; &] [s5;:Zlib`:`:`~Zlib`(`): [@(0.0.255) `~][* Zlib]()&] [s2;%% Destructor.&] +[s3;%% &] +[s0; &] +[ {{10000@(113.42.0) [s0;%% [*@7;4 Compression / decompression functions]]}}&] +[s3; &] +[s5;:ZCompress`(Stream`&`,Stream`&`,Gate2``): [@(0.0.255) int]_[* ZCompress]([_^Stream^ S +tream][@(0.0.255) `&]_[*@3 out], [_^Stream^ Stream][@(0.0.255) `&]_[*@3 in], +[_^Gate2^ Gate2]<[@(0.0.255) int], [@(0.0.255) int]>_[*@3 progress]_`=_[@(0.0.255) false])&] +[s5;:ZCompress`(const void`*`,int`,Gate2``): [_^String^ String]_[* ZCompress]( +[@(0.0.255) const]_[@(0.0.255) void]_`*[*@3 data], [@(0.0.255) int]_[*@3 len], +[_^Gate2^ Gate2]<[@(0.0.255) int], [@(0.0.255) int]>_[*@3 progress]_`=_[@(0.0.255) false])&] +[s5;:ZCompress`(const String`&`,Gate2``): [_^String^ String]_[* ZCompress]([@(0.0.255) c +onst]_[_^String^ String][@(0.0.255) `&]_[*@3 s], [_^Gate2^ Gate2]<[@(0.0.255) int], +[@(0.0.255) int]>_[*@3 progress]_`=_[@(0.0.255) false])&] +[s2;%% Compresses raw data using zlib from input stream [%-*@3 in], +memory [%-*@3 data][%- , ][%-*@3 len] or input string [%-*@3 s] to output +stream [%-*@3 out] (in this case returns a number of bytes written +or negative integer to signal error) or into String return value. +[%-*@3 progress] can be used to track progress of operation, returning +true cancels it.&] +[s3;%% &] +[s4;%% &] +[s5;:ZDecompress`(Stream`&`,Stream`&`,Gate2``): [@(0.0.255) int]_[* ZDecompres +s]([_^Stream^ Stream][@(0.0.255) `&]_[*@3 out], [_^Stream^ Stream][@(0.0.255) `&]_[*@3 in], +[_^Gate2^ Gate2]<[@(0.0.255) int], [@(0.0.255) int]>_[*@3 progress]_`=_[@(0.0.255) false])&] +[s5;:ZDecompress`(const String`&`,Gate2``): [_^String^ String]_[* ZDecompress]( +[@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_[*@3 s], [_^Gate2^ Gate2]<[@(0.0.255) in +t], [@(0.0.255) int]>_[*@3 progress]_`=_[@(0.0.255) false])&] +[s5;:ZDecompress`(const void`*`,int`,Gate2``): [_^String^ String]_[* ZDecompre +ss]([@(0.0.255) const]_[@(0.0.255) void]_`*[*@3 data], [@(0.0.255) int]_[*@3 len], +[_^Gate2^ Gate2]<[@(0.0.255) int], [@(0.0.255) int]>_[*@3 progress]_`=_[@(0.0.255) false])&] +[s2;%% Decompresses raw data using zlib from input stream [%-*@3 in], +memory [%-*@3 data][%- , ][%-*@3 len] or input string [%-*@3 s] to output +stream [%-*@3 out] (in this case returns a number of bytes written +or negative integer to signal error) or into String return value. +[%-*@3 progress] can be used to track progress of operation, returning +true cancels it.&] +[s3;%% &] +[s4;%% &] +[s5;:GZCompress`(Stream`&`,Stream`&`,int`,Gate2``): [@(0.0.255) int]_[* GZComp +ress]([_^Stream^ Stream][@(0.0.255) `&]_[*@3 out], [_^Stream^ Stream][@(0.0.255) `&]_[*@3 in], + [@(0.0.255) int]_[*@3 size], [_^Gate2^ Gate2]<[@(0.0.255) int], [@(0.0.255) int]>_[*@3 progr +ess]_`=_[@(0.0.255) false])&] +[s5;:GZCompress`(const void`*`,int`,Gate2``): [_^String^ String]_[* GZCompress +]([@(0.0.255) const]_[@(0.0.255) void]_`*[*@3 data], [@(0.0.255) int]_[*@3 len], +[_^Gate2^ Gate2]<[@(0.0.255) int], [@(0.0.255) int]>_[*@3 progress]_`=_[@(0.0.255) false])&] +[s5;:GZCompress`(const String`&`,Gate2``): [_^String^ String]_[* GZCompress]([@(0.0.255) c +onst]_[_^String^ String][@(0.0.255) `&]_[*@3 s], [_^Gate2^ Gate2]<[@(0.0.255) int], +[@(0.0.255) int]>_[*@3 progress]_`=_[@(0.0.255) false])&] +[s2;%% Compresses raw data into gzip file format from input stream +[%-*@3 in], memory [%-*@3 data][%- , ][%-*@3 len] or input string [%-*@3 s] +to output stream [%-*@3 out] (in this case returns a number of +bytes written or negative integer to signal error) or into String +return value. [%-*@3 progress] can be used to track progress of +operation, returning true cancels it.&] +[s3;%% &] +[s4;%% &] +[s5;:GZDecompress`(Stream`&`,Stream`&`,int`,Gate2``): [@(0.0.255) int]_[* GZDe +compress]([_^Stream^ Stream][@(0.0.255) `&]_[*@3 out], [_^Stream^ Stream][@(0.0.255) `&]_[*@3 i +n], [@(0.0.255) int]_[*@3 size], [_^Gate2^ Gate2]<[@(0.0.255) int], [@(0.0.255) int]>_[*@3 pr +ogress]_`=_[@(0.0.255) false])&] +[s5;:GZDecompress`(const void`*`,int`,Gate2``): [_^String^ String]_[* GZDecomp +ress]([@(0.0.255) const]_[@(0.0.255) void]_`*[*@3 data], [@(0.0.255) int]_[*@3 len], +[_^Gate2^ Gate2]<[@(0.0.255) int], [@(0.0.255) int]>_[*@3 progress]_`=_[@(0.0.255) false])&] +[s5;:GZDecompress`(const String`&`,Gate2``): [_^String^ String]_[* GZDecompres +s]([@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_[*@3 s], [_^Gate2^ Gate2]<[@(0.0.255) i +nt], [@(0.0.255) int]>_[*@3 progress]_`=_[@(0.0.255) false])&] +[s2;%% Decompresses raw data into gzip file format from input stream +[%-*@3 in], memory [%-*@3 data][%- , ][%-*@3 len] or input string [%-*@3 s] +to output stream [%-*@3 out] (in this case returns a number of +bytes written or negative integer to signal error) or into String +return value. [%-*@3 progress] can be used to track progress of +operation, returning true cancels it.&] +[s3;%% &] [s0;%% ] \ No newline at end of file diff --git a/uppsrc/Core/z.h b/uppsrc/Core/z.h index 130c7ca79..15e96a5bd 100644 --- a/uppsrc/Core/z.h +++ b/uppsrc/Core/z.h @@ -77,19 +77,17 @@ int ZCompress(Stream& out, Stream& in, int size, Gate2 progress = f int ZDecompress(Stream& out, Stream& in, int size, Gate2 progress = false, bool nohdr = false, dword *crc = NULL); int ZCompress(Stream& out, Stream& in, Gate2 progress = false); -int ZDecompress(Stream& out, Stream& in, Gate2 progress = false); - String ZCompress(const void *data, int len, Gate2 progress = false); +String ZCompress(const String& s, Gate2 progress = false); + +int ZDecompress(Stream& out, Stream& in, Gate2 progress = false); +String ZDecompress(const String& s, Gate2 progress = false); String ZDecompress(const void *data, int len, Gate2 progress = false); -String ZCompress(const String& s, Gate2 progress = false); -String ZDecompress(const String& s, Gate2 progress = false); - int GZCompress(Stream& out, Stream& in, int size, Gate2 progress = false); -int GZDecompress(Stream& out, Stream& in, int size, Gate2 progress = false); - String GZCompress(const void *data, int len, Gate2 progress = false); -String GZDecompress(const void *data, int len, Gate2 progress = false); - String GZCompress(const String& s, Gate2 progress = false); + +int GZDecompress(Stream& out, Stream& in, int size, Gate2 progress = false); +String GZDecompress(const void *data, int len, Gate2 progress = false); String GZDecompress(const String& s, Gate2 progress = false);