cmdcon: added `glconHide()`
[iv.d.git] / zopfli / package.d
blob37d12cab707523957ac75d8c34bd5fa8df6a6504
1 /*
2 Copyright 2011 Google Inc. All Rights Reserved.
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
16 Author: lode.vandevenne@gmail.com (Lode Vandevenne)
17 Author: jyrki.alakuijala@gmail.com (Jyrki Alakuijala)
19 module iv.zopfli /*is aliced*/;
20 extern(C) nothrow @nogc:
21 import iv.alice;
22 //pragma(lib, "libzopfli.a");
23 pragma(lib, "zopfli");
26 Options used throughout the program.
28 struct ZopfliOptions {
29 /* Whether to print output */
30 int verbose = 0;
32 /* Whether to print more detailed output */
33 int verbose_more = 0;
36 Maximum amount of times to rerun forward and backward pass to optimize LZ77
37 compression cost. Good values: 10, 15 for small files, 5 for files over
38 several MB in size or it will be too slow.
40 int numiterations = 15;
43 If true, splits the data in multiple deflate blocks with optimal choice
44 for the block boundaries. Block splitting gives better compression. Default:
45 true (1).
47 int blocksplitting = 1;
50 No longer used, left for compatibility.
52 int blocksplittinglast = 0;
55 Maximum amount of blocks to split into (0 for unlimited, but this can give
56 extreme results that hurt compression on some files). Default value: 15.
58 int blocksplittingmax = 15;
62 /* Output format */
63 alias ZopfliFormat = int;
64 enum {
65 ZOPFLI_FORMAT_GZIP,
66 ZOPFLI_FORMAT_ZLIB,
67 ZOPFLI_FORMAT_DEFLATE,
71 Compresses according to the given output format and appends the result to the
72 output.
74 options: global program options
75 output_type: the output format to use
76 out: pointer to the dynamic output array to which the result is appended. Must
77 be `free()`d after use (you can use `ZopfliFree()`)
78 outsize: pointer to the dynamic output array size
80 void ZopfliCompress (const ref ZopfliOptions options, ZopfliFormat output_type,
81 const(void)* indata, usize insize,
82 void** outarr, usize* outsize);
84 void ZopfliFree (void* ptr) { import core.stdc.stdlib : free; if (ptr !is null) free(ptr); }