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

Side by Side Diff: xz/debug/memusage.c

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/debug/known_sizes.c ('k') | xz/debug/repeat.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 memusage.c
4 /// \brief Calculates memory usage using lzma_memory_usage()
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 #include "sysdefs.h"
14 #include "lzma.h"
15 #include <stdio.h>
16
17 int
18 main(void)
19 {
20 lzma_options_lzma lzma = {
21 .dict_size = (1U << 30) + (1U << 29),
22 .lc = 3,
23 .lp = 0,
24 .pb = 2,
25 .preset_dict = NULL,
26 .preset_dict_size = 0,
27 .mode = LZMA_MODE_NORMAL,
28 .nice_len = 48,
29 .mf = LZMA_MF_BT4,
30 .depth = 0,
31 };
32
33 /*
34 lzma_options_filter filters[] = {
35 { LZMA_FILTER_LZMA1,
36 (lzma_options_lzma *)&lzma_preset_lzma[6 - 1] },
37 { UINT64_MAX, NULL }
38 };
39 */
40 lzma_filter filters[] = {
41 { LZMA_FILTER_LZMA1, &lzma },
42 { UINT64_MAX, NULL }
43 };
44
45 printf("Encoder: %10" PRIu64 " B\n",
46 lzma_raw_encoder_memusage(filters));
47 printf("Decoder: %10" PRIu64 " B\n",
48 lzma_raw_decoder_memusage(filters));
49
50 return 0;
51 }
OLDNEW
« no previous file with comments | « xz/debug/known_sizes.c ('k') | xz/debug/repeat.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698