Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(573)

Side by Side Diff: xz/src/liblzma/simple/simple_private.h

Issue 2869016: Add an unpatched version of xz, XZ Utils, to /trunk/deps/third_party (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « xz/src/liblzma/simple/simple_encoder.c ('k') | xz/src/liblzma/simple/sparc.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 /// \file simple_private.h
4 /// \brief Private definitions for so called simple filters
5 //
6 // Author: Lasse Collin
7 //
8 // This file has been put into the public domain.
9 // You can do whatever you want with this file.
10 //
11 ///////////////////////////////////////////////////////////////////////////////
12
13 #ifndef LZMA_SIMPLE_PRIVATE_H
14 #define LZMA_SIMPLE_PRIVATE_H
15
16 #include "simple_coder.h"
17
18
19 typedef struct lzma_simple_s lzma_simple;
20
21 struct lzma_coder_s {
22 /// Next filter in the chain
23 lzma_next_coder next;
24
25 /// True if the next coder in the chain has returned LZMA_STREAM_END
26 /// or if we have processed uncompressed_size bytes.
27 bool end_was_reached;
28
29 /// True if filter() should encode the data; false to decode.
30 /// Currently all simple filters use the same function for encoding
31 /// and decoding, because the difference between encoders and decoders
32 /// is very small.
33 bool is_encoder;
34
35 /// Pointer to filter-specific function, which does
36 /// the actual filtering.
37 size_t (*filter)(lzma_simple *simple, uint32_t now_pos,
38 bool is_encoder, uint8_t *buffer, size_t size);
39
40 /// Pointer to filter-specific data, or NULL if filter doesn't need
41 /// any extra data.
42 lzma_simple *simple;
43
44 /// The lowest 32 bits of the current position in the data. Most
45 /// filters need this to do conversions between absolute and relative
46 /// addresses.
47 uint32_t now_pos;
48
49 /// Size of the memory allocated for the buffer.
50 size_t allocated;
51
52 /// Flushing position in the temporary buffer. buffer[pos] is the
53 /// next byte to be copied to out[].
54 size_t pos;
55
56 /// buffer[filtered] is the first unfiltered byte. When pos is smaller
57 /// than filtered, there is unflushed filtered data in the buffer.
58 size_t filtered;
59
60 /// Total number of bytes (both filtered and unfiltered) currently
61 /// in the temporary buffer.
62 size_t size;
63
64 /// Temporary buffer
65 uint8_t buffer[];
66 };
67
68
69 extern lzma_ret lzma_simple_coder_init(lzma_next_coder *next,
70 lzma_allocator *allocator, const lzma_filter_info *filters,
71 size_t (*filter)(lzma_simple *simple, uint32_t now_pos,
72 bool is_encoder, uint8_t *buffer, size_t size),
73 size_t simple_size, size_t unfiltered_max,
74 uint32_t alignment, bool is_encoder);
75
76 #endif
OLDNEW
« no previous file with comments | « xz/src/liblzma/simple/simple_encoder.c ('k') | xz/src/liblzma/simple/sparc.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698