mirror of
https://github.com/PCSX2/xz.git
synced 2026-02-05 03:41:17 +01:00
Compare commits
734 Commits
v4.42.2alp
...
v5.0.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e32cb264ea | ||
|
|
65cff45f8f | ||
|
|
316c67ffda | ||
|
|
1931175eea | ||
|
|
841dc1f891 | ||
|
|
0f7e2d3624 | ||
|
|
793d857e01 | ||
|
|
afcff45cee | ||
|
|
22159c6ba2 | ||
|
|
5e34990595 | ||
|
|
1125611b9b | ||
|
|
3f8fa53837 | ||
|
|
320d734c20 | ||
|
|
2ee4edeffc | ||
|
|
73f56fb87d | ||
|
|
4ce1cf97a8 | ||
|
|
972f05d7a4 | ||
|
|
28154eeaf6 | ||
|
|
aa95516d3d | ||
|
|
58f52c72f4 | ||
|
|
162779682e | ||
|
|
45553f9b4b | ||
|
|
af9d48d551 | ||
|
|
d099ef9f51 | ||
|
|
df87249b26 | ||
|
|
68c453e1c7 | ||
|
|
b441d39855 | ||
|
|
82d5164839 | ||
|
|
6decc8b418 | ||
|
|
ecda90061d | ||
|
|
0fda1ae5b1 | ||
|
|
00be32978f | ||
|
|
7232fcf96b | ||
|
|
5fbce0b8d9 | ||
|
|
03ebd1bbb3 | ||
|
|
7bd0a5e7cc | ||
|
|
f71c4e16e9 | ||
|
|
316cbe2446 | ||
|
|
9311774c49 | ||
|
|
4a42aaee28 | ||
|
|
ce56f63c41 | ||
|
|
e6baedddcf | ||
|
|
b7afd3e22a | ||
|
|
3e564704bc | ||
|
|
2964d8d691 | ||
|
|
37c25658ef | ||
|
|
e45929260c | ||
|
|
6e1326fcdf | ||
|
|
b667a3ef63 | ||
|
|
8c947e9291 | ||
|
|
e61d85e082 | ||
|
|
23e23f1dc0 | ||
|
|
613939fc82 | ||
|
|
68b83f252d | ||
|
|
d09c5753e3 | ||
|
|
33c1c0e102 | ||
|
|
0076e03641 | ||
|
|
ce34ec4f54 | ||
|
|
f0fa880d24 | ||
|
|
ac462b1c47 | ||
|
|
d52b411716 | ||
|
|
ae74d1bdeb | ||
|
|
d492b80ddd | ||
|
|
825e859a90 | ||
|
|
acbc4cdecb | ||
|
|
ef364d3abc | ||
|
|
5629c4be07 | ||
|
|
f25a77e6b9 | ||
|
|
e75100f549 | ||
|
|
efeb998a2b | ||
|
|
389d418445 | ||
|
|
6389c773a4 | ||
|
|
71275457ca | ||
|
|
3ac35719d8 | ||
|
|
7b5db576fd | ||
|
|
d3cd7abe85 | ||
|
|
084c60d318 | ||
|
|
11f51b6714 | ||
|
|
b1c7368f95 | ||
|
|
630a8beda3 | ||
|
|
f9907503f8 | ||
|
|
fda4724d81 | ||
|
|
80b5675fa6 | ||
|
|
f9722dbeca | ||
|
|
61ae593661 | ||
|
|
9166682dc6 | ||
|
|
17d3c61edd | ||
|
|
84af9d8770 | ||
|
|
31575a449a | ||
|
|
cec0ddc8ec | ||
|
|
075257ab04 | ||
|
|
2577da9ebd | ||
|
|
a3c5997c57 | ||
|
|
a1766af582 | ||
|
|
2108801855 | ||
|
|
be16e28ece | ||
|
|
e23ea74f32 | ||
|
|
8dad2fd693 | ||
|
|
0b5f07fe37 | ||
|
|
a8760203f9 | ||
|
|
bb0b1004f8 | ||
|
|
639f8e2af3 | ||
|
|
41bc9956eb | ||
|
|
77a7746616 | ||
|
|
e6ad393358 | ||
|
|
58f5513182 | ||
|
|
bcb1b89834 | ||
|
|
da014d5597 | ||
|
|
8c7d3d1a07 | ||
|
|
ef840950ad | ||
|
|
c46afd6edc | ||
|
|
8fd3ac046d | ||
|
|
474bac0c33 | ||
|
|
373ee26f95 | ||
|
|
2fce9312f3 | ||
|
|
b4b1cbcb53 | ||
|
|
77fe5954cd | ||
|
|
fce69059cf | ||
|
|
a848e47ced | ||
|
|
b3ff7ba044 | ||
|
|
d5653ba8a1 | ||
|
|
792331bdee | ||
|
|
4a45dd4c39 | ||
|
|
01aa4869cb | ||
|
|
ce1f0deafe | ||
|
|
507a4a4dea | ||
|
|
b1cbfd40f0 | ||
|
|
a540198ffb | ||
|
|
bab0f01ed9 | ||
|
|
c15c42abb3 | ||
|
|
2130926dd1 | ||
|
|
bc612d0e0c | ||
|
|
e1b6935d60 | ||
|
|
3e49c8acb0 | ||
|
|
d8b41eedce | ||
|
|
b5fbab6123 | ||
|
|
29a7b250e6 | ||
|
|
e89d987056 | ||
|
|
e243145c84 | ||
|
|
ce6dc3c0a8 | ||
|
|
905e54804a | ||
|
|
4b346ae8af | ||
|
|
07dc34f6da | ||
|
|
44d70cb154 | ||
|
|
a334348dc0 | ||
|
|
70e5e2f6a7 | ||
|
|
01a414eaf4 | ||
|
|
920a69a8d8 | ||
|
|
019ae27c24 | ||
|
|
98a4856a6e | ||
|
|
703d2c33c0 | ||
|
|
d8a55c48b3 | ||
|
|
b6377fc990 | ||
|
|
d9986db782 | ||
|
|
0d3489efca | ||
|
|
3fb3d594a2 | ||
|
|
6548e30465 | ||
|
|
a290cfee3e | ||
|
|
a1f7a986b8 | ||
|
|
c737eec91d | ||
|
|
f4b2b52624 | ||
|
|
cf38da00a1 | ||
|
|
00fc1211ae | ||
|
|
9886d436ff | ||
|
|
2672bcc9f8 | ||
|
|
5527b7269a | ||
|
|
d0d1c51aea | ||
|
|
eb7d51a3fa | ||
|
|
4785f2021a | ||
|
|
6b50c9429b | ||
|
|
6503fde658 | ||
|
|
dd7c3841ff | ||
|
|
9d67588c15 | ||
|
|
fef6333f52 | ||
|
|
455e68c030 | ||
|
|
82220a1490 | ||
|
|
d4da177d5b | ||
|
|
f9dd797a42 | ||
|
|
ee5ddb8b28 | ||
|
|
11936ad3f5 | ||
|
|
2901a8e7e8 | ||
|
|
8884e16864 | ||
|
|
34eb5e201d | ||
|
|
96a4f840e3 | ||
|
|
b3cc4d8edd | ||
|
|
231c3c7098 | ||
|
|
0dbd0641db | ||
|
|
b4b1a56e0c | ||
|
|
5574d64e03 | ||
|
|
b063cc34a3 | ||
|
|
38b8035b5c | ||
|
|
e5496f9628 | ||
|
|
d9a9800597 | ||
|
|
d0b4bbf5da | ||
|
|
0bc9eab243 | ||
|
|
df254ce03b | ||
|
|
ef68dd4a92 | ||
|
|
0dd6d00766 | ||
|
|
2a98fdffd6 | ||
|
|
07a11dad44 | ||
|
|
37f31ead9d | ||
|
|
3ffd5d81a4 | ||
|
|
23ac2c44c3 | ||
|
|
cee12aa852 | ||
|
|
153c7740c5 | ||
|
|
8ea8dc754a | ||
|
|
1a7ec87c8e | ||
|
|
f29997a846 | ||
|
|
097bad0003 | ||
|
|
b56cb1fc31 | ||
|
|
171b03febf | ||
|
|
f7e44c6c11 | ||
|
|
7b76a3e233 | ||
|
|
0696f5d268 | ||
|
|
5e817a50d2 | ||
|
|
6db1c35be9 | ||
|
|
e0c2776b6f | ||
|
|
f057a33c6f | ||
|
|
8767b41534 | ||
|
|
919fbaff86 | ||
|
|
bd13b04e20 | ||
|
|
1f19690914 | ||
|
|
465d1b0d65 | ||
|
|
37de544414 | ||
|
|
f1a28b96c9 | ||
|
|
b9b5c54cd4 | ||
|
|
0733f4c999 | ||
|
|
7ac3985d89 | ||
|
|
c74c132f7f | ||
|
|
d315ca4930 | ||
|
|
e330fb7e6b | ||
|
|
93e418562c | ||
|
|
cf39faca59 | ||
|
|
2ddcae247c | ||
|
|
19b2674f07 | ||
|
|
2291346f0c | ||
|
|
418d64a32e | ||
|
|
f0bf7634b7 | ||
|
|
6d118a0b9d | ||
|
|
78e92c1847 | ||
|
|
7b7fe902d9 | ||
|
|
ebfb2c5e1f | ||
|
|
29fd321033 | ||
|
|
3782b3fee4 | ||
|
|
c5f68b5cc7 | ||
|
|
4a84d1adfd | ||
|
|
188a1dcd0c | ||
|
|
db9119b918 | ||
|
|
b3d105e697 | ||
|
|
5e000ff00d | ||
|
|
932b2e2044 | ||
|
|
4c3630ec41 | ||
|
|
0deb1bb60a | ||
|
|
e599bba421 | ||
|
|
49cfc8d392 | ||
|
|
15ffd675ab | ||
|
|
6bfdd3a88a | ||
|
|
4ab7b16b95 | ||
|
|
8905a33daa | ||
|
|
68059334ff | ||
|
|
221be761f4 | ||
|
|
18a4233a53 | ||
|
|
429910b2ba | ||
|
|
7aca7b3174 | ||
|
|
60ccb80c9c | ||
|
|
173368911c | ||
|
|
319a0fd7d7 | ||
|
|
25adaaa56e | ||
|
|
5f6dddc6c9 | ||
|
|
655457b9ad | ||
|
|
162189c347 | ||
|
|
2331f5f97a | ||
|
|
94c66b3297 | ||
|
|
3432e9c6aa | ||
|
|
27414daadf | ||
|
|
43f44160b1 | ||
|
|
682efdc1f9 | ||
|
|
c8c184db1c | ||
|
|
9756fce565 | ||
|
|
77007a7fb2 | ||
|
|
04dcbfdeb9 | ||
|
|
fd7618611a | ||
|
|
c29e76c0f9 | ||
|
|
696d7ee395 | ||
|
|
4c3558aa83 | ||
|
|
35b29e4424 | ||
|
|
2341437719 | ||
|
|
371b04e19f | ||
|
|
d88c4072b3 | ||
|
|
92e536d8b8 | ||
|
|
3e2ba8b585 | ||
|
|
8e8ebc17c5 | ||
|
|
b198e770a1 | ||
|
|
fe111a25cd | ||
|
|
10242a21e9 | ||
|
|
3ce1916c83 | ||
|
|
66da129c8e | ||
|
|
8238c4b240 | ||
|
|
71f18e8a06 | ||
|
|
5aa4678b23 | ||
|
|
e51b4e49e8 | ||
|
|
a4165d0584 | ||
|
|
df636eb4e0 | ||
|
|
180bdf58ea | ||
|
|
e1ce2291e7 | ||
|
|
e71903fc61 | ||
|
|
1d314b81aa | ||
|
|
a7f5d2fe48 | ||
|
|
b735cde20c | ||
|
|
0fd157cc00 | ||
|
|
b198da96ff | ||
|
|
669413bb2d | ||
|
|
dbbd8fb870 | ||
|
|
adbad2d16c | ||
|
|
e0236f1256 | ||
|
|
2f34fb2692 | ||
|
|
0db1befcfb | ||
|
|
8f8ec942d6 | ||
|
|
99f9e879a6 | ||
|
|
ef4cf1851d | ||
|
|
4c9c989d45 | ||
|
|
366e436090 | ||
|
|
64e498c89d | ||
|
|
a35755c5de | ||
|
|
98f3cac1ad | ||
|
|
d873a09e95 | ||
|
|
cd69a5a6c1 | ||
|
|
eed9953732 | ||
|
|
6f62fa88f4 | ||
|
|
1754b7e03e | ||
|
|
3bdb53792c | ||
|
|
5f16ef4abf | ||
|
|
96e4b257e1 | ||
|
|
25cc7a6e8c | ||
|
|
18c10c30d2 | ||
|
|
0a289c01ac | ||
|
|
5cc99db5ba | ||
|
|
7653d1cf48 | ||
|
|
f42ee98166 | ||
|
|
89dac1db6f | ||
|
|
6e685aae45 | ||
|
|
73f560ee5f | ||
|
|
7ff0004fbc | ||
|
|
449c634674 | ||
|
|
792db79f27 | ||
|
|
0adc72feb8 | ||
|
|
ad12edc952 | ||
|
|
b2b1f86753 | ||
|
|
c393055947 | ||
|
|
da0af22e4b | ||
|
|
65014fd211 | ||
|
|
5e1257466d | ||
|
|
cad62551c5 | ||
|
|
fe378d4707 | ||
|
|
390a640856 | ||
|
|
1c9360b7d1 | ||
|
|
d45615c555 | ||
|
|
eaf8367368 | ||
|
|
b317b218e2 | ||
|
|
ae82dde5d9 | ||
|
|
1735d31ea3 | ||
|
|
8ed156ce89 | ||
|
|
f6df39afaa | ||
|
|
1774f27c61 | ||
|
|
cb61345564 | ||
|
|
083c23c680 | ||
|
|
b4f5c81409 | ||
|
|
b1edee2cdc | ||
|
|
72aa0e9c5f | ||
|
|
dcedb6998c | ||
|
|
5f735dae80 | ||
|
|
b60376249e | ||
|
|
b4f92f522d | ||
|
|
4dd21d23f2 | ||
|
|
8836139b63 | ||
|
|
b0063023f8 | ||
|
|
071b825b23 | ||
|
|
03ca67fd37 | ||
|
|
a6f43e6412 | ||
|
|
f6ce63ebdb | ||
|
|
be06858d5c | ||
|
|
0255401e57 | ||
|
|
1496ff437c | ||
|
|
21c6b94373 | ||
|
|
e518d167aa | ||
|
|
31decdce04 | ||
|
|
4787d65443 | ||
|
|
2f0bc9cd40 | ||
|
|
02ddf09bc3 | ||
|
|
e79c42d854 | ||
|
|
94eb9ad46f | ||
|
|
9bab5336eb | ||
|
|
a0497ff7a0 | ||
|
|
390e69887f | ||
|
|
0df9299e24 | ||
|
|
cf751edfde | ||
|
|
63df14c57d | ||
|
|
fd6a380f4e | ||
|
|
68bf7ac298 | ||
|
|
47c2e21f82 | ||
|
|
489a3dbaa0 | ||
|
|
7494816ab0 | ||
|
|
11ae4ae35f | ||
|
|
3084d662d2 | ||
|
|
9c62371eab | ||
|
|
0dae8b7751 | ||
|
|
fdbc0cfa71 | ||
|
|
1d924e584b | ||
|
|
96c46df7de | ||
|
|
b6a30ee8c2 | ||
|
|
1ec5b00279 | ||
|
|
154f5aec2d | ||
|
|
e605c26636 | ||
|
|
a3bbbe05d3 | ||
|
|
53f7598998 | ||
|
|
0e27028d74 | ||
|
|
ae1ad9af54 | ||
|
|
79e25eded4 | ||
|
|
bc7c7109cc | ||
|
|
edfc2031e5 | ||
|
|
880c330938 | ||
|
|
3f86532407 | ||
|
|
bd7ca1dad5 | ||
|
|
d0ab8c1c73 | ||
|
|
bfd91198e4 | ||
|
|
3306cf3883 | ||
|
|
b719e63c5f | ||
|
|
fe5434f940 | ||
|
|
3dfa58a9ee | ||
|
|
975d8fd72a | ||
|
|
094b1b09a5 | ||
|
|
e1c3412eec | ||
|
|
75905a9afc | ||
|
|
d0c0b9e94e | ||
|
|
ccf92a29e8 | ||
|
|
99c1c2abfa | ||
|
|
22a0c6dd94 | ||
|
|
8dd7b6052e | ||
|
|
55fd41431e | ||
|
|
3e54ecee5c | ||
|
|
d64ca34f1b | ||
|
|
6a2eb54092 | ||
|
|
d9993fcb4d | ||
|
|
2dbdc5befb | ||
|
|
4ab7601091 | ||
|
|
b2172cf823 | ||
|
|
1aae869874 | ||
|
|
f54bcf6f80 | ||
|
|
982da7ed31 | ||
|
|
c4683a660b | ||
|
|
3241317093 | ||
|
|
f76e39cf93 | ||
|
|
449b8c832b | ||
|
|
850f740042 | ||
|
|
667481f1aa | ||
|
|
5fb34d8324 | ||
|
|
c129748675 | ||
|
|
1859d22d75 | ||
|
|
2c5fe958e4 | ||
|
|
c81f13ff29 | ||
|
|
0b3318661c | ||
|
|
9ec80355a7 | ||
|
|
d8b58d0993 | ||
|
|
0c09810cb3 | ||
|
|
2f1a8e8eb8 | ||
|
|
4810b6bc25 | ||
|
|
00be5d2e09 | ||
|
|
128586213f | ||
|
|
b056379490 | ||
|
|
dc8f3be06d | ||
|
|
8286a60b8f | ||
|
|
4fd43cb3a9 | ||
|
|
061748f593 | ||
|
|
9c45658ddc | ||
|
|
b59f1e98f5 | ||
|
|
d1d17a40d3 | ||
|
|
88d3e6b0b1 | ||
|
|
322ecf93c9 | ||
|
|
7eea8bec3a | ||
|
|
28e75f7086 | ||
|
|
7ed9d943b3 | ||
|
|
5cda29b566 | ||
|
|
050eb14d29 | ||
|
|
4820f10d0f | ||
|
|
e33194e79d | ||
|
|
4d00652e75 | ||
|
|
634636fa56 | ||
|
|
4fed98417d | ||
|
|
653e457e37 | ||
|
|
671a5adf1e | ||
|
|
17781c2c20 | ||
|
|
f9f2d1e743 | ||
|
|
ff7fb2c605 | ||
|
|
1ceebcf7e1 | ||
|
|
a94bf00d0a | ||
|
|
8582d392ba | ||
|
|
b1ae6dd731 | ||
|
|
1ea9e7f15a | ||
|
|
bceb3918db | ||
|
|
6efa2d80d4 | ||
|
|
f20a03206b | ||
|
|
ef7890d564 | ||
|
|
ccd57afa09 | ||
|
|
c596fda40b | ||
|
|
c58f469be5 | ||
|
|
cd70801520 | ||
|
|
656ec87882 | ||
|
|
691a9155b7 | ||
|
|
c7007ddf06 | ||
|
|
ae65dcfde2 | ||
|
|
a8368b75cd | ||
|
|
69472ee5f0 | ||
|
|
4249c8c15a | ||
|
|
6d1d6f4598 | ||
|
|
f901a290ee | ||
|
|
86a0ed8f01 | ||
|
|
54f716ba89 | ||
|
|
1880a3927b | ||
|
|
e114502b2b | ||
|
|
3c3905b534 | ||
|
|
0f295bf7a3 | ||
|
|
1e8e4fd1f3 | ||
|
|
5e4df4c3c0 | ||
|
|
fcfb86c777 | ||
|
|
bd137524f2 | ||
|
|
4c321a41c4 | ||
|
|
8e60c889a2 | ||
|
|
3bdbc12c05 | ||
|
|
a6639022fd | ||
|
|
ed3709000a | ||
|
|
ea560b0ea8 | ||
|
|
ad97483b6e | ||
|
|
7a57069167 | ||
|
|
018ae09df8 | ||
|
|
3a62a5fb85 | ||
|
|
c6ca26eef7 | ||
|
|
1dcecfb09b | ||
|
|
5cc5064cae | ||
|
|
f147666a5c | ||
|
|
13d68b0698 | ||
|
|
13a74b78e3 | ||
|
|
320601b2c7 | ||
|
|
ec490da522 | ||
|
|
16e8b98f26 | ||
|
|
5a710c3805 | ||
|
|
01892b2ca5 | ||
|
|
962f2231d4 | ||
|
|
fa3ab0df8a | ||
|
|
9373e81e18 | ||
|
|
cb072b7c84 | ||
|
|
123ab0acec | ||
|
|
9cfcd0c4f2 | ||
|
|
2ba01bfa75 | ||
|
|
07efcb5a6b | ||
|
|
32fe5fa541 | ||
|
|
0a31ed9d5e | ||
|
|
da98df5440 | ||
|
|
2496aee8a7 | ||
|
|
bea301c26d | ||
|
|
9c75b089b4 | ||
|
|
bab0590504 | ||
|
|
689602336d | ||
|
|
80c4158f19 | ||
|
|
fc68165745 | ||
|
|
ede675f9ac | ||
|
|
3b34851de1 | ||
|
|
57b9a145a5 | ||
|
|
eaafc4367c | ||
|
|
0809c46534 | ||
|
|
d25ab1b961 | ||
|
|
6368a2fa59 | ||
|
|
7d17818cec | ||
|
|
bf6348d1a3 | ||
|
|
803194ddd2 | ||
|
|
0ea98e52ba | ||
|
|
436fa5fae9 | ||
|
|
369f72fd65 | ||
|
|
e55e0e873c | ||
|
|
ed6664146f | ||
|
|
b09464bf9a | ||
|
|
11de5d5267 | ||
|
|
dc192b6343 | ||
|
|
944b62b932 | ||
|
|
8e074349e4 | ||
|
|
2f361ac19b | ||
|
|
3be21fb12f | ||
|
|
beeb810608 | ||
|
|
c324325f9f | ||
|
|
d3ba30243c | ||
|
|
8f804c29aa | ||
|
|
c99037ea10 | ||
|
|
22ba3b0b50 | ||
|
|
17c36422d4 | ||
|
|
283f939974 | ||
|
|
eb348a60b6 | ||
|
|
6c5306e312 | ||
|
|
712cfe3ebf | ||
|
|
bc04486e36 | ||
|
|
7ab493924e | ||
|
|
641998c3e1 | ||
|
|
ad999efd27 | ||
|
|
03e0e8a0d7 | ||
|
|
7521bbdc83 | ||
|
|
63b74d000e | ||
|
|
e6eb0a2675 | ||
|
|
7d516f5129 | ||
|
|
748d6e4274 | ||
|
|
bfde3b24a5 | ||
|
|
f310c50286 | ||
|
|
5ead36cf7f | ||
|
|
d4d7feb83d | ||
|
|
0541c5ea63 | ||
|
|
596fa1fac7 | ||
|
|
45e43e1695 | ||
|
|
c0e19e0662 | ||
|
|
de74858062 | ||
|
|
1a3b218598 | ||
|
|
7e796e312b | ||
|
|
7dd48578a3 | ||
|
|
b596fac963 | ||
|
|
e9f6e9c075 | ||
|
|
4c7ad179c7 | ||
|
|
288b232f54 | ||
|
|
c467b0defc | ||
|
|
f9842f7127 | ||
|
|
e988ea1d1a | ||
|
|
4441e00418 | ||
|
|
bf4200c818 | ||
|
|
7b8fc7e6b5 | ||
|
|
e0c3d0043d | ||
|
|
1fd76d4881 | ||
|
|
6e27b1098a | ||
|
|
db9df0a960 | ||
|
|
765f0b05f6 | ||
|
|
3a7cc5c3de | ||
|
|
e5fdec93e2 | ||
|
|
ed40dc5a2c | ||
|
|
ae0cd09a66 | ||
|
|
0e80ded13d | ||
|
|
8c8eb14055 | ||
|
|
980f65a9a1 | ||
|
|
99e12af4e2 | ||
|
|
58b78ab20c | ||
|
|
4d8cdbdab4 | ||
|
|
67321de963 | ||
|
|
863028cb7a | ||
|
|
cf49f42a6b | ||
|
|
1747b85a43 | ||
|
|
0ed6f1adce | ||
|
|
305afa38f6 | ||
|
|
d53e9b7705 | ||
|
|
107259e306 | ||
|
|
e141fe1895 | ||
|
|
23c227a864 | ||
|
|
61dc82f3e3 | ||
|
|
0ae3208db9 | ||
|
|
ab5feaf1fc | ||
|
|
079c4f7fc2 | ||
|
|
61d1784d8f | ||
|
|
c9cba97691 | ||
|
|
33be3c0e24 | ||
|
|
b254bd97b1 | ||
|
|
8f5794c8f1 | ||
|
|
f88590e001 | ||
|
|
bc0b945ca3 | ||
|
|
7599bb7064 | ||
|
|
0b58153931 | ||
|
|
5b5b13c7bb | ||
|
|
19389f2b82 | ||
|
|
9bc33a54cb | ||
|
|
01d71d60b7 | ||
|
|
8235e6e5b2 | ||
|
|
f10fc6a69d | ||
|
|
e5728142a2 | ||
|
|
10437b5b56 | ||
|
|
f3c88e8b8d | ||
|
|
54ec204f58 | ||
|
|
01b4b19f49 | ||
|
|
19bd7f3cf2 | ||
|
|
9f9b198301 | ||
|
|
78e85cb1a7 | ||
|
|
949d4346e2 | ||
|
|
d13d693155 | ||
|
|
362dc3843b | ||
|
|
e22b37968d | ||
|
|
b59ef39737 | ||
|
|
9547e734a0 | ||
|
|
3e09e1c058 | ||
|
|
a670fec802 | ||
|
|
3599dba957 | ||
|
|
f73c2ab607 | ||
|
|
382808514a | ||
|
|
0e70fbe403 | ||
|
|
379fbbe84d | ||
|
|
97d5fa8207 | ||
|
|
3bb9bb3109 | ||
|
|
7054c5f588 | ||
|
|
753e4d95cd | ||
|
|
faeac7b7ac | ||
|
|
a751126dbb | ||
|
|
9080267603 | ||
|
|
b4943ccf73 | ||
|
|
e2417b2b91 | ||
|
|
5d227e51c2 | ||
|
|
c7189d981a | ||
|
|
3dbbea82b7 | ||
|
|
2fd2d18154 | ||
|
|
9a71d57310 | ||
|
|
47f48fe993 | ||
|
|
3502b3e1d0 | ||
|
|
908b2ac604 | ||
|
|
ecb2a6548f | ||
|
|
eacb805043 | ||
|
|
1239649f96 | ||
|
|
88ee301ec2 | ||
|
|
c15a7abf66 | ||
|
|
4e7e54c4c5 | ||
|
|
a71864f77d | ||
|
|
072927905a | ||
|
|
d160ee3259 | ||
|
|
fc67f79f60 | ||
|
|
0029cbbabe | ||
|
|
bbfd1f6ab0 | ||
|
|
5db745cd2a | ||
|
|
44b333d461 | ||
|
|
ec1c82b2e8 | ||
|
|
2881570df6 | ||
|
|
698470b8f3 | ||
|
|
918bcb0e07 | ||
|
|
3e16d51dd6 | ||
|
|
5286723e0d | ||
|
|
ce8b036a6c | ||
|
|
7c1ad41eb6 | ||
|
|
ce64df7162 |
64
.gitignore
vendored
Normal file
64
.gitignore
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
*~
|
||||
*.bak
|
||||
*.bak[0-9]
|
||||
|
||||
.deps
|
||||
.libs
|
||||
*.la
|
||||
*.lo
|
||||
*.o
|
||||
Makefile.in
|
||||
|
||||
/ABOUT-NLS
|
||||
/autom4te.cache
|
||||
/Doxyfile
|
||||
/aclocal.m4
|
||||
/config.h
|
||||
/config.h.in
|
||||
/config.log
|
||||
/config.status
|
||||
/configure
|
||||
/libtool
|
||||
/stamp-h1
|
||||
|
||||
build-aux/compile
|
||||
build-aux/config.guess
|
||||
build-aux/config.rpath
|
||||
build-aux/config.sub
|
||||
build-aux/depcomp
|
||||
build-aux/install-sh
|
||||
build-aux/ltmain.sh
|
||||
build-aux/missing
|
||||
|
||||
/src/liblzma/liblzma.pc
|
||||
/src/lzmainfo/lzmainfo
|
||||
/src/xz/xz
|
||||
/src/xzdec/lzmadec
|
||||
/src/xzdec/xzdec
|
||||
|
||||
/src/scripts/xzdiff
|
||||
/src/scripts/xzgrep
|
||||
/src/scripts/xzless
|
||||
/src/scripts/xzmore
|
||||
|
||||
/tests/compress_generated_abc
|
||||
/tests/compress_generated_random
|
||||
/tests/compress_generated_text
|
||||
/tests/create_compress_files
|
||||
/tests/test_block_header
|
||||
/tests/test_check
|
||||
/tests/test_filter_flags
|
||||
/tests/test_index
|
||||
/tests/test_stream_flags
|
||||
|
||||
/lib/Makefile
|
||||
/tests/Makefile
|
||||
/Makefile
|
||||
/debug/Makefile
|
||||
/src/scripts/Makefile
|
||||
/src/xz/Makefile
|
||||
/src/Makefile
|
||||
/src/liblzma/Makefile
|
||||
/src/liblzma/api/Makefile
|
||||
/src/lzmainfo/Makefile
|
||||
/src/xzdec/Makefile
|
||||
35
AUTHORS
35
AUTHORS
@@ -1,18 +1,27 @@
|
||||
|
||||
Authors of LZMA Utils
|
||||
---------------------
|
||||
Authors of XZ Utils
|
||||
===================
|
||||
|
||||
Igor Pavlov
|
||||
* designed LZMA as an algorithm;
|
||||
* wrote an implementation known as LZMA SDK, which is part of
|
||||
the bigger 7-Zip project.
|
||||
XZ Utils is developed and maintained by Lasse Collin
|
||||
<lasse.collin@tukaani.org>.
|
||||
|
||||
Ville Koskinen
|
||||
* wrote the first version of the gzip-like lzma command line
|
||||
utility (C++)
|
||||
* helped a lot with the documentation.
|
||||
Major parts of liblzma are based on code written by Igor Pavlov,
|
||||
specifically the LZMA SDK <http://7-zip.org/sdk.html>. Without
|
||||
this code, XZ Utils wouldn't exist.
|
||||
|
||||
Lasse Collin
|
||||
* ported LZMA SDK to C and zlib-like API (liblzma);
|
||||
* rewrote the command line tool again to use liblzma and pthreads.
|
||||
The SHA-256 implementation in liblzma is based on the code found from
|
||||
7-Zip <http://7-zip.org/>, which has a modified version of the SHA-256
|
||||
code found from Crypto++ <http://www.cryptopp.com/>. The SHA-256 code
|
||||
in Crypto++ was written by Kevin Springle and Wei Dai.
|
||||
|
||||
Some scripts have been adapted from gzip. The original versions
|
||||
were written by Jean-loup Gailly, Charles Levert, and Paul Eggert.
|
||||
Andrew Dudman helped adapting the script and their man pages for
|
||||
XZ Utils.
|
||||
|
||||
The GNU Autotools based build system contains files from many authors,
|
||||
which I'm not trying list here.
|
||||
|
||||
Several people have contributed fixes or reported bugs. Most of them
|
||||
are mentioned in the file THANKS.
|
||||
|
||||
|
||||
69
COPYING
69
COPYING
@@ -1,24 +1,65 @@
|
||||
|
||||
LZMA Utils Licenses
|
||||
-------------------
|
||||
XZ Utils Licensing
|
||||
==================
|
||||
|
||||
Different licenses apply to different files in this package. Here
|
||||
is a rough summary of which license apply to which parts of this
|
||||
is a rough summary of which licenses apply to which parts of this
|
||||
package (but check the individual files to be sure!):
|
||||
- Everything under src/liblzma/check is public domain.
|
||||
- Everything else under the src directory is under the GNU LGPL
|
||||
2.1 or (at your opinion) any later version.
|
||||
- Outside the src directory, there are some files that are under
|
||||
the GNU GPL 2 or (at your opinion) any later version, or under
|
||||
the GNU GPL 3 or (at your opinion) any later version.
|
||||
- Most documentation files are under an all-permissive license.
|
||||
|
||||
The following license texts are included in the following files
|
||||
in this package:
|
||||
- liblzma is in the public domain.
|
||||
|
||||
- xz, xzdec, and lzmadec command line tools are in the public
|
||||
domain unless GNU getopt_long had to be compiled and linked
|
||||
in from the lib directory. The getopt_long code is under
|
||||
GNU LGPLv2.1+.
|
||||
|
||||
- The scripts to grep, diff, and view compressed files have been
|
||||
adapted from gzip. These scripts and their documentation are
|
||||
under GNU GPLv2+.
|
||||
|
||||
- All the documentation in the doc directory and most of the
|
||||
XZ Utils specific documentation files in other directories
|
||||
are in the public domain.
|
||||
|
||||
- Translated messages are in the public domain.
|
||||
|
||||
- The build system contains public domain files, and files that
|
||||
are under GNU GPLv2+ or GNU GPLv3+. None of these files end up
|
||||
in the binaries being built.
|
||||
|
||||
- Test files and test code in the tests directory, and debugging
|
||||
utilities in the debug directory are in the public domain.
|
||||
|
||||
- The extra directory may contain public domain files, and files
|
||||
that are under various free software licenses.
|
||||
|
||||
You can do whatever you want with the files that have been put into
|
||||
the public domain. If you find public domain legally problematic,
|
||||
take the previous sentence as a license grant. If you still find
|
||||
the lack of copyright legally problematic, you have too many
|
||||
lawyers.
|
||||
|
||||
As usual, this software is provided "as is", without any warranty.
|
||||
|
||||
If you copy significant amounts of public domain code from XZ Utils
|
||||
into your project, acknowledging this somewhere in your software is
|
||||
polite (especially if it is proprietary, non-free software), but
|
||||
naturally it is not legally required. Here is an example of a good
|
||||
notice to put into "about box" or into documentation:
|
||||
|
||||
This software includes code from XZ Utils <http://tukaani.org/xz/>.
|
||||
|
||||
The following license texts are included in the following files:
|
||||
- COPYING.LGPLv2.1: GNU Lesser General Public License version 2.1
|
||||
- COPYING.GPLv2: GNU General Public License version 2
|
||||
- COPYING.GPLv3: GNU General Public License version 3
|
||||
|
||||
If you have questions, don't hesitate to ask the copyright holder(s)
|
||||
for more information.
|
||||
Note that the toolchain (compiler, linker etc.) may add some code
|
||||
pieces that are copyrighted. Thus, it is possible that e.g. liblzma
|
||||
binary wouldn't actually be in the public domain in its entirety
|
||||
even though it contains no copyrighted code from the XZ Utils source
|
||||
package.
|
||||
|
||||
If you have questions, don't hesitate to ask the author(s) for more
|
||||
information.
|
||||
|
||||
|
||||
@@ -1,2 +1,7 @@
|
||||
See the commit log in the git repository:
|
||||
git://ctrl.tukaani.org/lzma-utils.git
|
||||
|
||||
git clone http://git.tukaani.org/xz.git
|
||||
|
||||
Note that "make dist" doesn't put this tiny file into the package.
|
||||
Instead, the git commit log is used as ChangeLog. See dist-hook in
|
||||
Makefile.am for details.
|
||||
|
||||
13
Doxyfile.in
13
Doxyfile.in
@@ -1,5 +1,8 @@
|
||||
# Doxyfile 1.4.7
|
||||
|
||||
# Copyright (C) 1997-2007 by Dimitri van Heesch
|
||||
# License: GNU GPLv2+
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project
|
||||
#
|
||||
@@ -115,7 +118,7 @@ FULL_PATH_NAMES = YES
|
||||
# If left blank the directory from which doxygen is run is used as the
|
||||
# path to strip.
|
||||
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_PATH = @top_srcdir@/src
|
||||
|
||||
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
|
||||
# the path mentioned in the documentation of a class, which tells
|
||||
@@ -955,13 +958,13 @@ ENABLE_PREPROCESSING = YES
|
||||
# compilation will be performed. Macro expansion can be done in a controlled
|
||||
# way by setting EXPAND_ONLY_PREDEF to YES.
|
||||
|
||||
MACRO_EXPANSION = NO
|
||||
MACRO_EXPANSION = YES
|
||||
|
||||
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
|
||||
# then the macro expansion is limited to the macros specified with the
|
||||
# PREDEFINED and EXPAND_AS_DEFINED tags.
|
||||
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
EXPAND_ONLY_PREDEF = YES
|
||||
|
||||
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
|
||||
# in the INCLUDE_PATH (see below) will be search if a #include is found.
|
||||
@@ -989,7 +992,9 @@ INCLUDE_FILE_PATTERNS =
|
||||
# undefined via #undef or recursively expanded use the := operator
|
||||
# instead of the = operator.
|
||||
|
||||
PREDEFINED =
|
||||
PREDEFINED = LZMA_API(type)=type \
|
||||
LZMA_API_IMPORT \
|
||||
LZMA_API_CALL=
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
|
||||
# this tag can be used to specify a list of macro names that should be expanded.
|
||||
|
||||
455
INSTALL
Normal file
455
INSTALL
Normal file
@@ -0,0 +1,455 @@
|
||||
|
||||
XZ Utils Installation
|
||||
=====================
|
||||
|
||||
0. Preface
|
||||
1. Supported platforms
|
||||
1.1. Compilers
|
||||
1.2. Platform-specific notes
|
||||
1.2.1. IRIX
|
||||
1.2.2. MINIX 3
|
||||
1.2.3. OpenVMS
|
||||
1.2.4. Solaris, OpenSolaris, and derivatives
|
||||
1.2.5. Tru64
|
||||
1.2.6. Windows
|
||||
1.2.7. DOS
|
||||
1.3. Adding support for new platforms
|
||||
2. configure options
|
||||
2.1. Static vs. dynamic linking of liblzma
|
||||
2.2. Optimizing xzdec and lzmadec
|
||||
3. xzgrep and other scripts
|
||||
3.1. Dependencies
|
||||
3.2. PATH
|
||||
4. Troubleshooting
|
||||
4.1. "No C99 compiler was found."
|
||||
4.2. "No POSIX conforming shell (sh) was found."
|
||||
4.3. configure works but build fails at crc32_x86.S
|
||||
4.4. Lots of warnings about symbol visibility
|
||||
|
||||
|
||||
0. Preface
|
||||
----------
|
||||
|
||||
If you aren't familiar with building packages that use GNU Autotools,
|
||||
see the file INSTALL.generic for generic instructions before reading
|
||||
further.
|
||||
|
||||
If you are going to build a package for distribution, see also the
|
||||
file PACKAGERS. It contains information that should help making the
|
||||
binary packages as good as possible, but the information isn't very
|
||||
interesting to those making local builds for private use or for use
|
||||
in special situations like embedded systems.
|
||||
|
||||
|
||||
1. Supported platforms
|
||||
----------------------
|
||||
|
||||
XZ Utils are developed on GNU/Linux, but they should work on many
|
||||
POSIX-like operating systems like *BSDs and Solaris, and even on
|
||||
a few non-POSIX operating systems.
|
||||
|
||||
|
||||
1.1. Compilers
|
||||
|
||||
A C99 compiler is required to compile XZ Utils. If you use GCC, you
|
||||
need at least version 3.x.x. GCC version 2.xx.x doesn't support some
|
||||
C99 features used in XZ Utils source code, thus GCC 2 won't compile
|
||||
XZ Utils.
|
||||
|
||||
XZ Utils takes advantage of some GNU C extensions when building
|
||||
with GCC. Because these extensions are used only when building
|
||||
with GCC, it should be possible to use any C99 compiler.
|
||||
|
||||
|
||||
1.2. Platform-specific notes
|
||||
|
||||
1.2.1. IRIX
|
||||
|
||||
MIPSpro 7.4.4m has been reported to produce broken code if using
|
||||
the -O2 optimization flag ("make check" fails). Using -O1 should
|
||||
work.
|
||||
|
||||
A problem has been reported when using shared liblzma. Passing
|
||||
--disable-shared to configure works around this. Alternatively,
|
||||
putting "-64" to CFLAGS to build a 64-bit version might help too.
|
||||
|
||||
|
||||
1.2.2. MINIX 3
|
||||
|
||||
The default install of MINIX 3 includes Amsterdam Compiler Kit (ACK),
|
||||
which doesn't support C99. Install GCC to compile XZ Utils.
|
||||
|
||||
MINIX 3.1.8 (and possibly some other versions too) has bugs in
|
||||
/usr/include/stdint.h, which has to be patched before XZ Utils
|
||||
can be compiled correctly. See
|
||||
<http://gforge.cs.vu.nl/gf/project/minix/tracker/?action=TrackerItemEdit&tracker_item_id=537>.
|
||||
|
||||
XZ Utils doesn't have code to detect the amount of physical RAM and
|
||||
number of CPU cores on MINIX 3.
|
||||
|
||||
See section 4.4 in this file about symbol visibility warnings (you
|
||||
may want to pass gl_cv_cc_visibility=no to configure).
|
||||
|
||||
|
||||
1.2.3. OpenVMS
|
||||
|
||||
XZ Utils can be built for OpenVMS, but the build system files
|
||||
are not included in the XZ Utils source package. The required
|
||||
OpenVMS-specific files are maintained by Jouk Jansen and can be
|
||||
downloaded here:
|
||||
|
||||
http://nchrem.tnw.tudelft.nl/openvms/software2.html#xzutils
|
||||
|
||||
|
||||
1.2.4. Solaris, OpenSolaris, and derivatives
|
||||
|
||||
The following linker error has been reported on some x86 systems:
|
||||
|
||||
ld: fatal: relocation error: R_386_GOTOFF: ...
|
||||
|
||||
This can be worked around by passing gl_cv_cc_visibility=no
|
||||
as an argument to the configure script.
|
||||
|
||||
|
||||
1.2.5. Tru64
|
||||
|
||||
If you try to use the native C compiler on Tru64 (passing CC=cc to
|
||||
configure), you may need the workaround mention in section 4.1 in
|
||||
this file (pass also ac_cv_prog_cc_c99= to configure).
|
||||
|
||||
|
||||
1.2.6. Windows
|
||||
|
||||
Building XZ Utils on Windows is supported under MinGW + MSYS,
|
||||
MinGW-w64 + MSYS, and Cygwin. There is windows/build.bash to
|
||||
ease packaging XZ Utils with MinGW(-w64) + MSYS into a
|
||||
redistributable .zip or .7z file. See windows/INSTALL-Windows.txt
|
||||
for more information.
|
||||
|
||||
It might be possible to build liblzma with a non-GNU toolchain too,
|
||||
but that will probably require writing a separate makefile. Building
|
||||
the command line tools with non-GNU toolchains will be harder than
|
||||
building only liblzma.
|
||||
|
||||
Even if liblzma is built with MinGW, the resulting DLL or static
|
||||
library can be used by other compilers and linkers, including MSVC.
|
||||
Thus, it shouldn't be a problem to use MinGW to build liblzma even
|
||||
if you cannot use MinGW to build the rest of your project. See
|
||||
windows/README-Windows.txt for details.
|
||||
|
||||
|
||||
1.2.7. DOS
|
||||
|
||||
There is an experimental Makefile in the "dos" directory to build
|
||||
XZ Utils on DOS using DJGPP. Support for long file names (LFN) is
|
||||
needed. See dos/README for more information.
|
||||
|
||||
GNU Autotools based build hasn't been tried on DOS. If you try, I
|
||||
would like to hear if it worked.
|
||||
|
||||
|
||||
1.3. Adding support for new platforms
|
||||
|
||||
If you have written patches to make XZ Utils to work on previously
|
||||
unsupported platform, please send the patches to me! I will consider
|
||||
including them to the official version. It's nice to minimize the
|
||||
need of third-party patching.
|
||||
|
||||
One exception: Don't request or send patches to change the whole
|
||||
source package to C89. I find C99 substantially nicer to write and
|
||||
maintain. However, the public library headers must be in C89 to
|
||||
avoid frustrating those who maintain programs, which are strictly
|
||||
in C89 or C++.
|
||||
|
||||
|
||||
2. configure options
|
||||
--------------------
|
||||
|
||||
In most cases, the defaults are what you want. Many of the options
|
||||
below are useful only when building a size-optimized version of
|
||||
liblzma or command line tools.
|
||||
|
||||
--enable-encoders=LIST
|
||||
--disable-encoders
|
||||
Specify a comma-separated LIST of filter encoders to
|
||||
build. See "./configure --help" for exact list of
|
||||
available filter encoders. The default is to build all
|
||||
supported encoders.
|
||||
|
||||
If LIST is empty or --disable-encoders is used, no filter
|
||||
encoders will be built and also the code shared between
|
||||
encoders will be omitted.
|
||||
|
||||
Disabling encoders will remove some symbols from the
|
||||
liblzma ABI, so this option should be used only when it
|
||||
is known to not cause problems.
|
||||
|
||||
--enable-decoders=LIST
|
||||
--disable-decoders
|
||||
This is like --enable-encoders but for decoders. The
|
||||
default is to build all supported decoders.
|
||||
|
||||
--enable-match-finders=LIST
|
||||
liblzma includes two categories of match finders:
|
||||
hash chains and binary trees. Hash chains (hc3 and hc4)
|
||||
are quite fast but they don't provide the best compression
|
||||
ratio. Binary trees (bt2, bt3 and bt4) give excellent
|
||||
compression ratio, but they are slower and need more
|
||||
memory than hash chains.
|
||||
|
||||
You need to enable at least one match finder to build the
|
||||
LZMA1 or LZMA2 filter encoders. Usually hash chains are
|
||||
used only in the fast mode, while binary trees are used to
|
||||
when the best compression ratio is wanted.
|
||||
|
||||
The default is to build all the match finders if LZMA1
|
||||
or LZMA2 filter encoders are being built.
|
||||
|
||||
--enable-checks=LIST
|
||||
liblzma support multiple integrity checks. CRC32 is
|
||||
mandatory, and cannot be omitted. See "./configure --help"
|
||||
for exact list of available integrity check types.
|
||||
|
||||
liblzma and the command line tools can decompress files
|
||||
which use unsupported integrity check type, but naturally
|
||||
the file integrity cannot be verified in that case.
|
||||
|
||||
Disabling integrity checks may remove some symbols from
|
||||
the liblzma ABI, so this option should be used only when
|
||||
it is known to not cause problems.
|
||||
|
||||
--disable-xz
|
||||
--disable-xzdec
|
||||
--disable-lzmadec
|
||||
--disable-lzmainfo
|
||||
Don't build and install the command line tool mentioned
|
||||
in the option name.
|
||||
|
||||
NOTE: Disabling xz will skip some tests in "make check".
|
||||
|
||||
NOTE: If xzdec is disabled and lzmadec is left enabled,
|
||||
a dangling man page symlink lzmadec.1 -> xzdec.1 is
|
||||
created.
|
||||
|
||||
--disable-lzma-links
|
||||
Don't create symlinks for LZMA Utils compatibility.
|
||||
This includes lzma, unlzma, and lzcat. If scripts are
|
||||
installed, also lzdiff, lzcmp, lzgrep, lzegrep, lzfgrep,
|
||||
lzmore, and lzless will be omitted if this option is used.
|
||||
|
||||
--disable-scripts
|
||||
Don't install the scripts xzdiff, xzgrep, xzmore, xzless,
|
||||
and their symlinks.
|
||||
|
||||
--disable-assembler
|
||||
liblzma includes some assembler optimizations. Currently
|
||||
there is only assembler code for CRC32 and CRC64 for
|
||||
32-bit x86.
|
||||
|
||||
All the assembler code in liblzma is position-independent
|
||||
code, which is suitable for use in shared libraries and
|
||||
position-independent executables. So far only i386
|
||||
instructions are used, but the code is optimized for i686
|
||||
class CPUs. If you are compiling liblzma exclusively for
|
||||
pre-i686 systems, you may want to disable the assembler
|
||||
code.
|
||||
|
||||
--enable-unaligned-access
|
||||
Allow liblzma to use unaligned memory access for 16-bit
|
||||
and 32-bit loads and stores. This should be enabled only
|
||||
when the hardware supports this, i.e. when unaligned
|
||||
access is fast. Some operating system kernels emulate
|
||||
unaligned access, which is extremely slow. This option
|
||||
shouldn't be used on systems that rely on such emulation.
|
||||
|
||||
Unaligned access is enabled by default on x86, x86-64,
|
||||
and big endian PowerPC.
|
||||
|
||||
--enable-small
|
||||
Reduce the size of liblzma by selecting smaller but
|
||||
semantically equivalent version of some functions, and
|
||||
omit precomputed lookup tables. This option tends to
|
||||
make liblzma slightly slower.
|
||||
|
||||
Note that while omitting the precomputed tables makes
|
||||
liblzma smaller on disk, the tables are still needed at
|
||||
run time, and need to be computed at startup. This also
|
||||
means that the RAM holding the tables won't be shared
|
||||
between applications linked against shared liblzma.
|
||||
|
||||
This option doesn't modify CFLAGS to tell the compiler
|
||||
to optimize for size. You need to add -Os or equivalent
|
||||
flag(s) to CFLAGS manually.
|
||||
|
||||
--enable-assume-ram=SIZE
|
||||
On the most common operating systems, XZ Utils is able to
|
||||
detect the amount of physical memory on the system. This
|
||||
information is used by the options --memlimit-compress,
|
||||
--memlimit-decompress, and --memlimit when setting the
|
||||
limit to a percentage of total RAM.
|
||||
|
||||
On some systems, there is no code to detect the amount of
|
||||
RAM though. Using --enable-assume-ram one can set how much
|
||||
memory to assume on these systems. SIZE is given as MiB.
|
||||
The default is 128 MiB.
|
||||
|
||||
Feel free to send patches to add support for detecting
|
||||
the amount of RAM on the operating system you use. See
|
||||
src/common/tuklib_physmem.c for details.
|
||||
|
||||
--disable-threads
|
||||
Disable threading support. This makes some things
|
||||
thread-unsafe, meaning that if multithreaded application
|
||||
calls liblzma functions from more than one thread,
|
||||
something bad may happen.
|
||||
|
||||
Use this option if threading support causes you trouble,
|
||||
or if you know that you will use liblzma only from
|
||||
single-threaded applications and want to avoid dependency
|
||||
on libpthread.
|
||||
|
||||
--enable-debug
|
||||
This enables the assert() macro and possibly some other
|
||||
run-time consistency checks. It makes the code slower, so
|
||||
you normally don't want to have this enabled.
|
||||
|
||||
--enable-werror
|
||||
If building with GCC, make all compiler warnings an error,
|
||||
that abort the compilation. This may help catching bugs,
|
||||
and should work on most systems. This has no effect on the
|
||||
resulting binaries.
|
||||
|
||||
|
||||
2.1. Static vs. dynamic linking of liblzma
|
||||
|
||||
On 32-bit x86, linking against static liblzma can give a minor
|
||||
speed improvement. Static libraries on x86 are usually compiled as
|
||||
position-dependent code (non-PIC) and shared libraries are built as
|
||||
position-independent code (PIC). PIC wastes one register, which can
|
||||
make the code slightly slower compared to a non-PIC version. (Note
|
||||
that this doesn't apply to x86-64.)
|
||||
|
||||
If you want to link xz against static liblzma, the simplest way
|
||||
is to pass --disable-shared to configure. If you want also shared
|
||||
liblzma, run configure again and run "make install" only for
|
||||
src/liblzma.
|
||||
|
||||
|
||||
2.2. Optimizing xzdec and lzmadec
|
||||
|
||||
xzdec and lzmadec are intended to be relatively small instead of
|
||||
optimizing for the best speed. Thus, it is a good idea to build
|
||||
xzdec and lzmadec separately:
|
||||
|
||||
- To link the tools against static liblzma, pass --disable-shared
|
||||
to configure.
|
||||
|
||||
- To select somewhat size-optimized variant of some things in
|
||||
liblzma, pass --enable-small to configure.
|
||||
|
||||
- Tell the compiler to optimize for size instead of speed.
|
||||
E.g. with GCC, put -Os into CFLAGS.
|
||||
|
||||
- xzdec and lzmadec will never use multithreading capabilities of
|
||||
liblzma. You can avoid dependency on libpthread by passing
|
||||
--disable-threads to configure.
|
||||
|
||||
- There are and will be no translated messages for xzdec and
|
||||
lzmadec, so it is fine to pass also --disable-nls to configure.
|
||||
|
||||
- Only decoder code is needed, so you can speed up the build
|
||||
slightly by passing --disable-encoders to configure. This
|
||||
shouldn't affect the final size of the executables though,
|
||||
because the linker is able to omit the encoder code anyway.
|
||||
|
||||
If you have no use for xzdec or lzmadec, you can disable them with
|
||||
--disable-xzdec and --disable-lzmadec.
|
||||
|
||||
|
||||
3. xzgrep and other scripts
|
||||
---------------------------
|
||||
|
||||
3.1. Dependencies
|
||||
|
||||
POSIX shell (sh) and bunch of other standard POSIX tools are required
|
||||
to run the scripts. The configure script tries to find a POSIX
|
||||
compliant sh, but if it fails, you can force the shell by passing
|
||||
gl_cv_posix_shell=/path/to/posix-sh as an argument to the configure
|
||||
script.
|
||||
|
||||
Some of the scripts require also mktemp. The original mktemp can be
|
||||
found from <http://www.mktemp.org/>. On GNU, most will use the mktemp
|
||||
program from GNU coreutils instead of the original implementation.
|
||||
Both mktemp versions are fine for XZ Utils (and practically for
|
||||
everything else too).
|
||||
|
||||
|
||||
3.2. PATH
|
||||
|
||||
The scripts assume that the required tools (standard POSIX utilities,
|
||||
mktemp, and xz) are in PATH; the scripts don't set the PATH themselves.
|
||||
Some people like this while some think this is a bug. Those in the
|
||||
latter group can easily patch the scripts before running the configure
|
||||
script by taking advantage of a placeholder line in the scripts.
|
||||
|
||||
For example, to make the scripts prefix /usr/bin:/bin to PATH:
|
||||
|
||||
perl -pi -e 's|^#SET_PATH.*$|PATH=/usr/bin:/bin:\$PATH|' \
|
||||
src/scripts/xz*.in
|
||||
|
||||
|
||||
4. Troubleshooting
|
||||
------------------
|
||||
|
||||
4.1. "No C99 compiler was found."
|
||||
|
||||
You need a C99 compiler to build XZ Utils. If the configure script
|
||||
cannot find a C99 compiler and you think you have such a compiler
|
||||
installed, set the compiler command by passing CC=/path/to/c99 as
|
||||
an argument to the configure script.
|
||||
|
||||
If you get this error even when you think your compiler supports C99,
|
||||
you can override the test by passing ac_cv_prog_cc_c99= as an argument
|
||||
to the configure script. The test for C99 compiler is not perfect (and
|
||||
it is not as easy to make it perfect as it sounds), so sometimes this
|
||||
may be needed. You will get a compile error if your compiler doesn't
|
||||
support enough C99.
|
||||
|
||||
|
||||
4.2. "No POSIX conforming shell (sh) was found."
|
||||
|
||||
xzgrep and other scripts need a shell that (roughly) conforms
|
||||
to POSIX. The configure script tries to find such a shell. If
|
||||
it fails, you can force the shell to be used by passing
|
||||
gl_cv_posix_shell=/path/to/posix-sh as an argument to the configure
|
||||
script.
|
||||
|
||||
|
||||
4.3. configure works but build fails at crc32_x86.S
|
||||
|
||||
The easy fix is to pass --disable-assembler to the configure script.
|
||||
|
||||
The configure script determines if assembler code can be used by
|
||||
looking at the configure triplet; there is currently no check if
|
||||
the assembler code can actually actually be built. The x86 assembler
|
||||
code should work on x86 GNU/Linux, *BSDs, Solaris, Darwin, MinGW,
|
||||
Cygwin, and DJGPP. On other x86 systems, there may be problems and
|
||||
the assembler code may need to be disabled with the configure option.
|
||||
|
||||
If you get this error when building for x86-64, you have specified or
|
||||
the configure script has misguessed your architecture. Pass the
|
||||
correct configure triplet using the --build=CPU-COMPANY-SYSTEM option
|
||||
(see INSTALL.generic).
|
||||
|
||||
|
||||
4.4. Lots of warnings about symbol visibility
|
||||
|
||||
On some systems where symbol visibility isn't supported, GCC may
|
||||
still accept the visibility options and attributes, which will make
|
||||
configure think that visibility is supported. This will result in
|
||||
many compiler warnings. You can avoid the warnings by forcing the
|
||||
visibility support off by passing gl_cv_cc_visibility=no as an
|
||||
argument to the configure script. This has no effect on the
|
||||
resulting binaries, but fewer warnings looks nicer and may allow
|
||||
using --enable-werror.
|
||||
|
||||
365
INSTALL.generic
Normal file
365
INSTALL.generic
Normal file
@@ -0,0 +1,365 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||
2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. This file is offered as-is,
|
||||
without warranty of any kind.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package. Some packages provide this
|
||||
`INSTALL' file but do not implement all of the features documented
|
||||
below. The lack of an optional feature in a given package is not
|
||||
necessarily a bug. More recommendations for GNU packages can be found
|
||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package, generally using the just-built uninstalled binaries.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation. When installing into a prefix owned by root, it is
|
||||
recommended that the package be configured and built as a regular
|
||||
user, and only the `make install' phase executed with root
|
||||
privileges.
|
||||
|
||||
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||
this time using the binaries in their final installed location.
|
||||
This target does not install anything. Running this target as a
|
||||
regular user, particularly if the prior `make install' required
|
||||
root privileges, verifies that the installation completed
|
||||
correctly.
|
||||
|
||||
6. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
7. Often, you can also type `make uninstall' to remove the installed
|
||||
files again. In practice, not all packages have tested that
|
||||
uninstallation works correctly, even though it is required by the
|
||||
GNU Coding Standards.
|
||||
|
||||
8. Some packages, particularly those that use Automake, provide `make
|
||||
distcheck', which can by used by developers to test that all other
|
||||
targets like `make install' and `make uninstall' work correctly.
|
||||
This target is generally not run by end users.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'. This
|
||||
is known as a "VPATH" build.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
On MacOS X 10.5 and later systems, you can create libraries and
|
||||
executables that work on multiple system types--known as "fat" or
|
||||
"universal" binaries--by specifying multiple `-arch' options to the
|
||||
compiler but only a single `-arch' option to the preprocessor. Like
|
||||
this:
|
||||
|
||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CPP="gcc -E" CXXCPP="g++ -E"
|
||||
|
||||
This is not guaranteed to produce working output in all cases, you
|
||||
may have to build one architecture at a time and combine the results
|
||||
using the `lipo' tool if you have problems.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||
absolute file name.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them. In general, the
|
||||
default for these options is expressed in terms of `${prefix}', so that
|
||||
specifying just `--prefix' will affect all of the other directory
|
||||
specifications that were not explicitly provided.
|
||||
|
||||
The most portable way to affect installation locations is to pass the
|
||||
correct locations to `configure'; however, many packages provide one or
|
||||
both of the following shortcuts of passing variable assignments to the
|
||||
`make install' command line to change installation locations without
|
||||
having to reconfigure or recompile.
|
||||
|
||||
The first method involves providing an override variable for each
|
||||
affected directory. For example, `make install
|
||||
prefix=/alternate/directory' will choose an alternate location for all
|
||||
directory configuration variables that were expressed in terms of
|
||||
`${prefix}'. Any directories that were specified during `configure',
|
||||
but not in terms of `${prefix}', must each be overridden at install
|
||||
time for the entire installation to be relocated. The approach of
|
||||
makefile variable overrides for each directory variable is required by
|
||||
the GNU Coding Standards, and ideally causes no recompilation.
|
||||
However, some platforms have known limitations with the semantics of
|
||||
shared libraries that end up requiring recompilation when using this
|
||||
method, particularly noticeable in packages that use GNU Libtool.
|
||||
|
||||
The second method involves providing the `DESTDIR' variable. For
|
||||
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||
`/alternate/directory' before all installation names. The approach of
|
||||
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||
does not work on platforms that have drive letters. On the other hand,
|
||||
it does better at avoiding recompilation issues, and works well even
|
||||
when some directory options were not specified in terms of `${prefix}'
|
||||
at `configure' time.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Some packages offer the ability to configure how verbose the
|
||||
execution of `make' will be. For these packages, running `./configure
|
||||
--enable-silent-rules' sets the default to minimal output, which can be
|
||||
overridden with `make V=1'; while running `./configure
|
||||
--disable-silent-rules' sets the default to verbose, which can be
|
||||
overridden with `make V=0'.
|
||||
|
||||
Particular systems
|
||||
==================
|
||||
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||
CC is not installed, it is recommended to use the following options in
|
||||
order to use an ANSI C compiler:
|
||||
|
||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
to try
|
||||
|
||||
./configure CC="cc"
|
||||
|
||||
and if that doesn't work, try
|
||||
|
||||
./configure CC="cc -nodtk"
|
||||
|
||||
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||
directory contains several dysfunctional programs; working variants of
|
||||
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||
in your `PATH', put it _after_ `/usr/bin'.
|
||||
|
||||
On Haiku, software installed for all users goes in `/boot/common',
|
||||
not `/usr/local'. It is recommended to use the following options:
|
||||
|
||||
./configure --prefix=/boot/common
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS
|
||||
KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of all of the options to `configure', and exit.
|
||||
|
||||
`--help=short'
|
||||
`--help=recursive'
|
||||
Print a summary of the options unique to this package's
|
||||
`configure', and exit. The `short' variant lists options used
|
||||
only in the top level, while the `recursive' variant lists options
|
||||
also present in any nested packages.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--prefix=DIR'
|
||||
Use DIR as the installation prefix. *note Installation Names::
|
||||
for more details, including other options available for fine-tuning
|
||||
the installation locations.
|
||||
|
||||
`--no-create'
|
||||
`-n'
|
||||
Run the configure checks, but stop before creating any output
|
||||
files.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
90
Makefile.am
90
Makefile.am
@@ -1,17 +1,11 @@
|
||||
##
|
||||
## Copyright (C) 2007 Lasse Collin
|
||||
## Author: Lasse Collin
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
## modify it under the terms of the GNU Lesser General Public
|
||||
## License as published by the Free Software Foundation; either
|
||||
## version 2.1 of the License, or (at your option) any later version.
|
||||
##
|
||||
## This library is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## Lesser General Public License for more details.
|
||||
## This file has been put into the public domain.
|
||||
## You can do whatever you want with this file.
|
||||
##
|
||||
|
||||
DIST_SUBDIRS = lib src po tests debug
|
||||
SUBDIRS =
|
||||
|
||||
if COND_GNULIB
|
||||
@@ -20,16 +14,80 @@ endif
|
||||
|
||||
SUBDIRS += src po tests
|
||||
|
||||
dist_doc_DATA = \
|
||||
AUTHORS \
|
||||
COPYING \
|
||||
COPYING.GPLv2 \
|
||||
NEWS \
|
||||
README \
|
||||
THANKS \
|
||||
TODO \
|
||||
doc/faq.txt \
|
||||
doc/history.txt \
|
||||
doc/xz-file-format.txt \
|
||||
doc/lzma-file-format.txt
|
||||
|
||||
examplesdir = $(docdir)/examples
|
||||
dist_examples_DATA = \
|
||||
doc/examples/xz_pipe_comp.c \
|
||||
doc/examples/xz_pipe_decomp.c
|
||||
|
||||
EXTRA_DIST = \
|
||||
m4 \
|
||||
config.rpath \
|
||||
Doxyfile.in \
|
||||
extra \
|
||||
doc \
|
||||
dos \
|
||||
windows \
|
||||
autogen.sh \
|
||||
Doxyfile.in \
|
||||
COPYING.GPLv2 \
|
||||
COPYING.GPLv3 \
|
||||
COPYING.LGPLv2.1
|
||||
COPYING.LGPLv2.1 \
|
||||
INSTALL.generic \
|
||||
PACKAGERS \
|
||||
build-aux/manconv.sh \
|
||||
build-aux/version.sh
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
# List of man pages to conver to PDF and plain text in the dist-hook target.
|
||||
manfiles = \
|
||||
src/xz/xz.1 \
|
||||
src/xzdec/xzdec.1 \
|
||||
src/lzmainfo/lzmainfo.1 \
|
||||
src/scripts/xzdiff.1 \
|
||||
src/scripts/xzgrep.1 \
|
||||
src/scripts/xzless.1 \
|
||||
src/scripts/xzmore.1
|
||||
|
||||
# Create ChangeLog from output of "git log --date=iso --stat".
|
||||
# Convert the man pages to PDF and plain text (ASCII only) formats.
|
||||
dist-hook:
|
||||
if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
|
||||
( cd "$(srcdir)" && git log --date=iso --stat ) \
|
||||
> "$(distdir)/ChangeLog"; \
|
||||
fi
|
||||
if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
|
||||
dest="$(distdir)/doc/man" && \
|
||||
$(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
|
||||
for FILE in $(manfiles); do \
|
||||
BASE=`basename $$FILE .1` && \
|
||||
sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
|
||||
< "$(srcdir)/$$FILE" \
|
||||
> "$$dest/pdf-a4/$$BASE-a4.pdf" && \
|
||||
sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
|
||||
< "$(srcdir)/$$FILE" \
|
||||
> "$$dest/pdf-letter/$$BASE-letter.pdf" && \
|
||||
sh "$(srcdir)/build-aux/manconv.sh" ascii \
|
||||
< "$(srcdir)/$$FILE" \
|
||||
> "$$dest/txt/$$BASE.txt"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# This works with GNU tar and gives cleaner package than normal 'make dist'.
|
||||
mydist:
|
||||
VERSION=$(VERSION); \
|
||||
if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
|
||||
SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
|
||||
test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
|
||||
fi; \
|
||||
TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
|
||||
$(MAKE) VERSION="$$VERSION" dist-gzip
|
||||
|
||||
126
NEWS
126
NEWS
@@ -0,0 +1,126 @@
|
||||
|
||||
XZ Utils Release Notes
|
||||
======================
|
||||
|
||||
5.0.3 (2011-05-21)
|
||||
|
||||
* liblzma fixes:
|
||||
|
||||
- A memory leak was fixed.
|
||||
|
||||
- lzma_stream_buffer_encode() no longer creates an empty .xz
|
||||
Block if encoding an empty buffer. Such an empty Block with
|
||||
LZMA2 data would trigger a bug in 5.0.1 and older (see the
|
||||
first bullet point in 5.0.2 notes). When releasing 5.0.2,
|
||||
I thought that no encoder creates this kind of files but
|
||||
I was wrong.
|
||||
|
||||
- Validate function arguments better in a few functions. Most
|
||||
importantly, specifying an unsupported integrity check to
|
||||
lzma_stream_buffer_encode() no longer creates a corrupt .xz
|
||||
file. Probably no application tries to do that, so this
|
||||
shouldn't be a big problem in practice.
|
||||
|
||||
- Document that lzma_block_buffer_encode(),
|
||||
lzma_easy_buffer_encode(), lzma_stream_encoder(), and
|
||||
lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
|
||||
|
||||
- The return values of the _memusage() functions are now
|
||||
documented better.
|
||||
|
||||
* Fix command name detection in xzgrep. xzegrep and xzfgrep now
|
||||
correctly use egrep and fgrep instead of grep.
|
||||
|
||||
* French translation was added.
|
||||
|
||||
|
||||
5.0.2 (2011-04-01)
|
||||
|
||||
* LZMA2 decompressor now correctly accepts LZMA2 streams with no
|
||||
uncompressed data. Previously it considered them corrupt. The
|
||||
bug can affect applications that use raw LZMA2 streams. It is
|
||||
very unlikely to affect .xz files because no compressor creates
|
||||
.xz files with empty LZMA2 streams. (Empty .xz files are a
|
||||
different thing than empty LZMA2 streams.)
|
||||
|
||||
* "xz --suffix=.foo filename.foo" now refuses to compress the
|
||||
file due to it already having the suffix .foo. It was already
|
||||
documented on the man page, but the code lacked the test.
|
||||
|
||||
* "xzgrep -l foo bar.xz" works now.
|
||||
|
||||
* Polish translation was added.
|
||||
|
||||
|
||||
5.0.1 (2011-01-29)
|
||||
|
||||
* xz --force now (de)compresses files that have setuid, setgid,
|
||||
or sticky bit set and files that have multiple hard links.
|
||||
The man page had it documented this way already, but the code
|
||||
had a bug.
|
||||
|
||||
* gzip and bzip2 support in xzdiff was fixed.
|
||||
|
||||
* Portability fixes
|
||||
|
||||
* Minor fix to Czech translation
|
||||
|
||||
|
||||
5.0.0 (2010-10-23)
|
||||
|
||||
Only the most important changes compared to 4.999.9beta are listed
|
||||
here. One change is especially important:
|
||||
|
||||
* The memory usage limit is now disabled by default. Some scripts
|
||||
written before this change may have used --memory=max on xz command
|
||||
line or in XZ_OPT. THESE USES OF --memory=max SHOULD BE REMOVED
|
||||
NOW, because they interfere with user's ability to set the memory
|
||||
usage limit himself. If user-specified limit causes problems to
|
||||
your script, blame the user.
|
||||
|
||||
Other significant changes:
|
||||
|
||||
* Added support for XZ_DEFAULTS environment variable. This variable
|
||||
allows users to set default options for xz, e.g. default memory
|
||||
usage limit or default compression level. Scripts that use xz
|
||||
must never set or unset XZ_DEFAULTS. Scripts should use XZ_OPT
|
||||
instead if they need a way to pass options to xz via an
|
||||
environment variable.
|
||||
|
||||
* The compression settings associated with the preset levels
|
||||
-0 ... -9 have been changed. --extreme was changed a little too.
|
||||
It is now less likely to make compression worse, but with some
|
||||
files the new --extreme may compress slightly worse than the old
|
||||
--extreme.
|
||||
|
||||
* If a preset level (-0 ... -9) is specified after a custom filter
|
||||
chain options have been used (e.g. --lzma2), the custom filter
|
||||
chain will be forgotten. Earlier the preset options were
|
||||
completely ignored after custom filter chain options had been
|
||||
seen.
|
||||
|
||||
* xz will create sparse files when decompressing if the uncompressed
|
||||
data contains long sequences of binary zeros. This is done even
|
||||
when writing to standard output that is connected to a regular
|
||||
file and certain additional conditions are met to make it safe.
|
||||
|
||||
* Support for "xz --list" was added. Combine with --verbose or
|
||||
--verbose --verbose (-vv) for detailed output.
|
||||
|
||||
* I had hoped that liblzma API would have been stable after
|
||||
4.999.9beta, but there have been a couple of changes in the
|
||||
advanced features, which don't affect most applications:
|
||||
|
||||
- Index handling code was revised. If you were using the old
|
||||
API, you will get a compiler error (so it's easy to notice).
|
||||
|
||||
- A subtle but important change was made to the Block handling
|
||||
API. lzma_block.version has to be initialized even for
|
||||
lzma_block_header_decode(). Code that doesn't do it will work
|
||||
for now, but might break in the future, which makes this API
|
||||
change easy to miss.
|
||||
|
||||
* The major soname has been bumped to 5.0.0. liblzma API and ABI
|
||||
are now stable, so the need to recompile programs linking against
|
||||
liblzma shouldn't arise soon.
|
||||
|
||||
|
||||
231
PACKAGERS
Normal file
231
PACKAGERS
Normal file
@@ -0,0 +1,231 @@
|
||||
|
||||
Information to packagers of XZ Utils
|
||||
====================================
|
||||
|
||||
0. Preface
|
||||
1. Package naming
|
||||
2. Package description
|
||||
3. License
|
||||
4. configure options
|
||||
5. Additional documentation
|
||||
6. Extra files
|
||||
7. Installing XZ Utils and LZMA Utils in parallel
|
||||
8. Example
|
||||
|
||||
|
||||
0. Preface
|
||||
----------
|
||||
|
||||
This document is meant for people who create and maintain XZ Utils
|
||||
packages for operating system distributions. The focus is on GNU/Linux
|
||||
systems, but most things apply to other systems too.
|
||||
|
||||
While the standard "configure && make DESTDIR=$PKG install" should
|
||||
give a pretty good package, there are some details which packagers
|
||||
may want to tweak.
|
||||
|
||||
Packagers should also read the INSTALL file.
|
||||
|
||||
|
||||
1. Package naming
|
||||
-----------------
|
||||
|
||||
The preferred name for the XZ Utils package is "xz", because that's
|
||||
the name of the upstream tarball. Naturally you may have good reasons
|
||||
to use some other name; I won't get angry about it. ;-) It's just nice
|
||||
to be able to point people to the correct package name without asking
|
||||
what distro they have.
|
||||
|
||||
If your distro policy is to split things into small pieces, here is
|
||||
one suggestion:
|
||||
|
||||
xz xz, xzdec, scripts (xzdiff, xzgrep, etc.), docs
|
||||
xz-lzma lzma, unlzma, lzcat, lzgrep etc. symlinks and
|
||||
lzmadec binary for compatibility with LZMA Utils
|
||||
liblzma liblzma.so.*
|
||||
liblzma-devel liblzma.so, liblzma.a, API headers
|
||||
|
||||
|
||||
2. Package description
|
||||
----------------------
|
||||
|
||||
Here is a suggestion which you may use as the package description.
|
||||
If you can use only one-line description, pick only the first line.
|
||||
Naturally, feel free to use some other description if you find it
|
||||
better, and maybe send it to me too.
|
||||
|
||||
Library and command line tools for XZ and LZMA compressed files
|
||||
|
||||
XZ Utils provide a general purpose data compression library
|
||||
and command line tools. The native file format is the .xz
|
||||
format, but also the legacy .lzma format is supported. The .xz
|
||||
format supports multiple compression algorithms, of which LZMA2
|
||||
is currently the primary algorithm. With typical files, XZ Utils
|
||||
create about 30 % smaller files than gzip.
|
||||
|
||||
If you are splitting XZ Utils into multiple packages, here are some
|
||||
suggestions for package descriptions:
|
||||
|
||||
xz:
|
||||
|
||||
Command line tools for XZ and LZMA compressed files
|
||||
|
||||
This package includes the xz compression tool and other command
|
||||
line tools from XZ Utils. xz has command line syntax similar to
|
||||
that of gzip. The native file format is the .xz format, but also
|
||||
the legacy .lzma format is supported. The .xz format supports
|
||||
multiple compression algorithms, of which LZMA2 is currently the
|
||||
primary algorithm. With typical files, XZ Utils create about 30 %
|
||||
smaller files than gzip.
|
||||
|
||||
Note that this package doesn't include the files needed for
|
||||
LZMA Utils 4.32.x compatibility. Install also the xz-lzma
|
||||
package to make XZ Utils emulate LZMA Utils 4.32.x.
|
||||
|
||||
xz-lzma:
|
||||
|
||||
LZMA Utils emulation with XZ Utils
|
||||
|
||||
This package includes executables and symlinks to make
|
||||
XZ Utils emulate lzma, unlzma, lzcat, and other command
|
||||
line tools found from the legacy LZMA Utils 4.32.x package.
|
||||
|
||||
liblzma:
|
||||
|
||||
Library for XZ and LZMA compressed files
|
||||
|
||||
liblzma is a general purpose data compression library with
|
||||
an API similar to that of zlib. liblzma supports multiple
|
||||
algorithms, of which LZMA2 is currently the primary algorithm.
|
||||
The native file format is .xz, but also the legacy .lzma
|
||||
format and raw streams (no headers at all) are supported.
|
||||
|
||||
This package includes the shared library.
|
||||
|
||||
liblzma-devel:
|
||||
|
||||
Library for XZ and LZMA compressed files
|
||||
|
||||
This package includes the API headers, static library, and
|
||||
other development files related to liblzma.
|
||||
|
||||
|
||||
3. License
|
||||
----------
|
||||
|
||||
If the package manager supports a license field, you probably should
|
||||
put GPLv2+ there (GNU GPL v2 or later). The interesting parts of
|
||||
XZ Utils are in the public domain, but some less important files
|
||||
ending up into the binary package are under GPLv2+. So it is simplest
|
||||
to just say GPLv2+ if you cannot specify "public domain and GPLv2+".
|
||||
|
||||
If you split XZ Utils into multiple packages as described earlier
|
||||
in this file, liblzma and liblzma-dev packages will contain only
|
||||
public domain code (from XZ Utils at least; compiler or linker may
|
||||
add some third-party code, which may be copyrighted).
|
||||
|
||||
|
||||
4. configure options
|
||||
--------------------
|
||||
|
||||
Unless you are building a package for a distribution that is meant
|
||||
only for embedded systems, don't use the following configure options:
|
||||
|
||||
--enable-debug
|
||||
--enable-encoders (*)
|
||||
--enable-decoders
|
||||
--enable-match-finders
|
||||
--enable-checks
|
||||
--enable-small (*)
|
||||
--disable-threads (*)
|
||||
|
||||
(*) These are OK when building xzdec and lzmadec as described
|
||||
in INSTALL.
|
||||
|
||||
xzdec and lzmadec don't provide any functionality that isn't already
|
||||
available in the xz tool. Shipping xzdec and lzmadec without size
|
||||
optimization and statically-linked liblzma isn't very useful. Doing
|
||||
that would give users the xzdec man page, which may make it easier
|
||||
for people to find out that such tools exists, but the executables
|
||||
wouldn't have any advantage over the full-featured xz.
|
||||
|
||||
|
||||
5. Additional documentation
|
||||
---------------------------
|
||||
|
||||
"make install" copies some additional documentation to $docdir
|
||||
(--docdir in configure). There is a copy of the GNU GPL v2, which
|
||||
can be replaced with a symlink if your distro ships with shared
|
||||
copies of the common license texts.
|
||||
|
||||
liblzma API is currently only documented using Doxygen tags in the
|
||||
API headers. It hasn't been tested much how good results Doxygen
|
||||
is able to make from the tags (e.g. Doxyfile might need tweaking,
|
||||
the tagging may need to be improved etc.), so it might be simpler
|
||||
to just let people read docs directly from the .h files for now,
|
||||
and also save quite a bit in package size at the same time.
|
||||
|
||||
|
||||
6. Extra files
|
||||
--------------
|
||||
|
||||
The "extra" directory contains some small extra tools or other files.
|
||||
The exact set of extra files can vary between XZ Utils releases. The
|
||||
extra files have only limited use or they are too dangerous to be
|
||||
put directly to $bindir (7z2lzma.sh is a good example, since it can
|
||||
silently create corrupt output if certain conditions are not met).
|
||||
|
||||
If you feel like it, you may copy the extra directory under the doc
|
||||
directory (e.g. /usr/share/doc/xz/extra). Maybe some people will find
|
||||
them useful. However, most people needing these tools probably are
|
||||
able to find them from the source package too.
|
||||
|
||||
The "debug" directory contains some tools that are useful only when
|
||||
hacking on XZ Utils. Don't package these tools.
|
||||
|
||||
|
||||
7. Installing XZ Utils and LZMA Utils in parallel
|
||||
-------------------------------------------------
|
||||
|
||||
XZ Utils and LZMA Utils 4.32.x can be installed in parallel by
|
||||
omitting the compatibility symlinks (lzma, unlzma, lzcat, lzgrep etc.)
|
||||
from the XZ Utils package. It's probably a good idea to still package
|
||||
the symlinks into a separate package so that users may choose if they
|
||||
want to use XZ Utils or LZMA Utils for handling .lzma files.
|
||||
|
||||
|
||||
8. Example
|
||||
----------
|
||||
|
||||
Here is an example for i686 GNU/Linux that
|
||||
- links xz and lzmainfo against shared liblzma;
|
||||
- links size-optimized xzdec and lzmadec against static liblzma
|
||||
while avoiding libpthread dependency;
|
||||
- includes only shared liblzma in the final package; and
|
||||
- copies also the "extra" directory to the package.
|
||||
|
||||
PKG=/tmp/xz-pkg
|
||||
tar xf xz-x.y.z.tar.gz
|
||||
cd xz-x.y.z
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--disable-static \
|
||||
--disable-xzdec \
|
||||
--disable-lzmadec \
|
||||
CFLAGS='-march=i686 -mtune=generic -O2'
|
||||
make
|
||||
make DESTDIR=$PKG install-strip
|
||||
make clean
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--disable-shared \
|
||||
--disable-nls \
|
||||
--disable-encoders \
|
||||
--enable-small \
|
||||
--disable-threads \
|
||||
CFLAGS='-march=i686 -mtune=generic -Os'
|
||||
make -C src/liblzma
|
||||
make -C src/xzdec
|
||||
make -C src/xzdec DESTDIR=$PKG install-strip
|
||||
cp -a extra $PKG/usr/share/doc/xz
|
||||
|
||||
407
README
407
README
@@ -1,151 +1,304 @@
|
||||
|
||||
LZMA Utils
|
||||
----------
|
||||
XZ Utils
|
||||
========
|
||||
|
||||
Warning
|
||||
|
||||
This is an early alpha version. Don't trust the files produced by
|
||||
this version of the software - not even if the software can
|
||||
uncompress the files properly! This is because the file format
|
||||
isn't completely frozen yet.
|
||||
|
||||
So please test a lot, but don't use for anything serious yet.
|
||||
0. Overview
|
||||
1. Documentation
|
||||
1.1. Overall documentation
|
||||
1.2. Documentation for command line tools
|
||||
1.3. Documentation for liblzma
|
||||
2. Version numbering
|
||||
3. Reporting bugs
|
||||
4. Translating the xz tool
|
||||
5. Other implementations of the .xz format
|
||||
6. Contact information
|
||||
|
||||
|
||||
Overview
|
||||
0. Overview
|
||||
-----------
|
||||
|
||||
LZMA is a general purporse compression algorithm designed by
|
||||
Igor Pavlov as part of 7-Zip. It provides high compression ratio
|
||||
while keeping the decompression speed fast.
|
||||
XZ Utils provide a general-purpose data compression library and
|
||||
command line tools. The native file format is the .xz format, but
|
||||
also the legacy .lzma format is supported. The .xz format supports
|
||||
multiple compression algorithms, which are called "filters" in
|
||||
context of XZ Utils. The primary filter is currently LZMA2. With
|
||||
typical files, XZ Utils create about 30 % smaller files than gzip.
|
||||
|
||||
LZMA Utils are an attempt to make LZMA compression easy to use
|
||||
on free (as in freedom) operating systems. This is achieved by
|
||||
providing tools and libraries which are similar to use than the
|
||||
equivalents of the most popular existing compression algorithms.
|
||||
To ease adapting support for the .xz format into existing applications
|
||||
and scripts, the API of liblzma is somewhat similar to the API of the
|
||||
popular zlib library. For the same reason, the command line tool xz
|
||||
has similar command line syntax than that of gzip.
|
||||
|
||||
LZMA Utils consist of a few relatively separate parts:
|
||||
* liblzma is an encoder/decoder library with support for several
|
||||
filters (algorithm implementations). The primary filter is LZMA.
|
||||
* libzfile enables reading from and writing to gzip, bzip2 and
|
||||
LZMA compressed and uncompressed files with an API similar to
|
||||
the standard ANSI-C file I/O.
|
||||
[ NOTE: libzfile is not implemented yet. ]
|
||||
* lzma command line tool has almost identical syntax than gzip
|
||||
and bzip2. It makes LZMA easy for average users, but also
|
||||
provides advanced options to finetune the compression settings.
|
||||
* A few shell scripts make diffing and grepping LZMA compressed
|
||||
files easy. The scripts were adapted from gzip and bzip2.
|
||||
When aiming for the highest compression ratio, LZMA2 encoder uses
|
||||
a lot of CPU time and may use, depending on the settings, even
|
||||
hundreds of megabytes of RAM. However, in fast modes, LZMA2 encoder
|
||||
competes with bzip2 in compression speed, RAM usage, and compression
|
||||
ratio.
|
||||
|
||||
LZMA2 is reasonably fast to decompress. It is a little slower than
|
||||
gzip, but a lot faster than bzip2. Being fast to decompress means
|
||||
that the .xz format is especially nice when the same file will be
|
||||
decompressed very many times (usually on different computers), which
|
||||
is the case e.g. when distributing software packages. In such
|
||||
situations, it's not too bad if the compression takes some time,
|
||||
since that needs to be done only once to benefit many people.
|
||||
|
||||
With some file types, combining (or "chaining") LZMA2 with an
|
||||
additional filter can improve compression ratio. A filter chain may
|
||||
contain up to four filters, although usually only one two is used.
|
||||
For example, putting a BCJ (Branch/Call/Jump) filter before LZMA2
|
||||
in the filter chain can improve compression ratio of executable files.
|
||||
|
||||
Since the .xz format allows adding new filter IDs, it is possible that
|
||||
some day there will be a filter that is, for example, much faster to
|
||||
compress than LZMA2 (but probably with worse compression ratio).
|
||||
Similarly, it is possible that some day there is a filter that will
|
||||
compress better than LZMA2.
|
||||
|
||||
XZ Utils doesn't support multithreaded compression or decompression
|
||||
yet. It has been planned though and taken into account when designing
|
||||
the .xz file format.
|
||||
|
||||
|
||||
Supported platforms
|
||||
1. Documentation
|
||||
----------------
|
||||
|
||||
LZMA Utils are developed on GNU+Linux, but they should work at
|
||||
least on *BSDs and Solaris. They probably work on some other
|
||||
POSIX-like operating systems too.
|
||||
1.1. Overall documentation
|
||||
|
||||
If you use GCC to compile LZMA Utils, you need at least version
|
||||
3.x.x. GCC version 2.xx.x doesn't support some C99 features used
|
||||
in LZMA Utils source code, thus GCC 2 won't compile LZMA Utils.
|
||||
README This file
|
||||
|
||||
If you have written patches to make LZMA Utils to work on previously
|
||||
unsupported platform, please send the patches to me! I will consider
|
||||
including them to the official version. It's nice to minimize the
|
||||
need of third-party patching.
|
||||
INSTALL.generic Generic install instructions for those not familiar
|
||||
with packages using GNU Autotools
|
||||
INSTALL Installation instructions specific to XZ Utils
|
||||
PACKAGERS Information to packagers of XZ Utils
|
||||
|
||||
One exception: Don't request or send patches to change the whole
|
||||
source package to C89. I find C99 substantially nicer to write and
|
||||
maintain. However, the public library headers must be in C89 to
|
||||
avoid frustrating those who maintain programs, which are strictly
|
||||
in C89 or C++.
|
||||
COPYING XZ Utils copyright and license information
|
||||
COPYING.GPLv2 GNU General Public License version 2
|
||||
COPYING.GPLv3 GNU General Public License version 3
|
||||
COPYING.LGPLv2.1 GNU Lesser General Public License version 2.1
|
||||
|
||||
AUTHORS The main authors of XZ Utils
|
||||
THANKS Incomplete list of people who have helped making
|
||||
this software
|
||||
NEWS User-visible changes between XZ Utils releases
|
||||
ChangeLog Detailed list of changes (commit log)
|
||||
TODO Known bugs and some sort of to-do list
|
||||
|
||||
Note that only some of the above files are included in binary
|
||||
packages.
|
||||
|
||||
|
||||
configure options
|
||||
1.2. Documentation for command line tools
|
||||
|
||||
If you are not familiar with `configure' scripts, read the file
|
||||
INSTALL first.
|
||||
|
||||
In most cases, the default --enable/--disable/--with/--without options
|
||||
are what you want. Don't touch them if you are unsure.
|
||||
|
||||
--disable-encoder
|
||||
Do not compile the encoder component of liblzma. This
|
||||
implies --disable-match-finders. If you need only
|
||||
the decoder, you can decrease the library size
|
||||
dramatically with this option.
|
||||
|
||||
The default is to build the encoder.
|
||||
|
||||
--disable-decoder
|
||||
Do not compile the decoder component of liblzma.
|
||||
|
||||
The default is to build the decoder.
|
||||
|
||||
--enable-filters=
|
||||
liblzma supports several filters. See liblzma-intro.txt
|
||||
for a little more information about these.
|
||||
|
||||
The default is to build all the filters.
|
||||
|
||||
--enable-match-finders=
|
||||
liblzma includes two categories of match finders:
|
||||
hash chains and binary trees. Hash chains (hc3 and hc4)
|
||||
are quite fast but they don't provide the best compression
|
||||
ratio. Binary trees (bt2, bt3 and bt4) give excellent
|
||||
compression ratio, but they are slower and need more
|
||||
memory than hash chains.
|
||||
|
||||
You need to enable at least one match finder to build the
|
||||
LZMA filter encoder. Usually hash chains are used only in
|
||||
the fast mode, while binary trees are used to when the best
|
||||
compression ratio is wanted.
|
||||
|
||||
The default is to build all the match finders.
|
||||
|
||||
--enable-checks=
|
||||
liblzma support multiple integrity checks. CRC32 is
|
||||
mandatory, and cannot be omitted. See liblzma-intro.txt
|
||||
for more information about usage of the integrity checks.
|
||||
|
||||
--disable-assembler
|
||||
liblzma includes some assembler optimizations. Currently
|
||||
there is only assembler code for CRC32 and CRC64 for
|
||||
32-bit x86.
|
||||
|
||||
All the assembler code in liblzma is position-independent
|
||||
code, which is suitable for use in shared libraries and
|
||||
position-independent executables.
|
||||
|
||||
--enable-small
|
||||
Omits precomputed tables. This makes liblzma a few KiB
|
||||
smaller. Startup time increases, because the tables need
|
||||
to be computed first.
|
||||
|
||||
--enable-debug
|
||||
This enables the assert() macro and possibly some other
|
||||
run-time consistency checks. It slows down things somewhat,
|
||||
so you normally don't want to have this enabled.
|
||||
|
||||
--enable-werror
|
||||
Makes all compiler warnings an error, that abort the
|
||||
compilation. This may help catching bugs, and should work
|
||||
on most systems. This has no effect on the resulting
|
||||
binaries.
|
||||
The command line tools are documented as man pages. In source code
|
||||
releases (and possibly also in some binary packages), the man pages
|
||||
are also provided in plain text (ASCII only) and PDF formats in the
|
||||
directory "doc/man" to make the man pages more accessible to those
|
||||
whose operating system doesn't provide an easy way to view man pages.
|
||||
|
||||
|
||||
Static vs. dynamic linking of the command line tools
|
||||
1.3. Documentation for liblzma
|
||||
|
||||
By default, the command line tools are linked statically against
|
||||
liblzma. There a are a few reasons:
|
||||
The liblzma API headers include short docs about each function
|
||||
and data type as Doxygen tags. These docs should be quite OK as
|
||||
a quick reference.
|
||||
|
||||
- The executable(s) can be in /bin while the shared liblzma can still
|
||||
be in /usr/lib (if the distro uses such file system hierachy).
|
||||
I have planned to write a bunch of very well documented example
|
||||
programs, which (due to comments) should work as a tutorial to
|
||||
various features of liblzma. No such example programs have been
|
||||
written yet.
|
||||
|
||||
- It's easier to copy the executables to other systems, since they
|
||||
depend only on libc.
|
||||
For now, if you have never used liblzma, libbzip2, or zlib, I
|
||||
recommend learning *basics* of zlib API. Once you know that, it
|
||||
should be easier to learn liblzma.
|
||||
|
||||
- It's slightly faster on some architectures like x86.
|
||||
http://zlib.net/manual.html
|
||||
http://zlib.net/zlib_how.html
|
||||
|
||||
If you don't like this, you can get the command line tools linked
|
||||
against the shared liblzma by specifying --disable-static to configure.
|
||||
This disables building static liblzma completely.
|
||||
|
||||
2. Version numbering
|
||||
--------------------
|
||||
|
||||
The version number format of XZ Utils is X.Y.ZS:
|
||||
|
||||
- X is the major version. When this is incremented, the library
|
||||
API and ABI break.
|
||||
|
||||
- Y is the minor version. It is incremented when new features are
|
||||
added without breaking existing API or ABI. Even Y indicates
|
||||
stable release and odd Y indicates unstable (alpha or beta
|
||||
version).
|
||||
|
||||
- Z is the revision. This has different meaning for stable and
|
||||
unstable releases:
|
||||
* Stable: Z is incremented when bugs get fixed without adding
|
||||
any new features.
|
||||
* Unstable: Z is just a counter. API or ABI of features added
|
||||
in earlier unstable releases having the same X.Y may break.
|
||||
|
||||
- S indicates stability of the release. It is missing from the
|
||||
stable releases where Y is an even number. When Y is odd, S
|
||||
is either "alpha" or "beta" to make it very clear that such
|
||||
versions are not stable releases. The same X.Y.Z combination is
|
||||
not used for more than one stability level i.e. after X.Y.Zalpha,
|
||||
the next version can be X.Y.(Z+1)beta but not X.Y.Zbeta.
|
||||
|
||||
|
||||
3. Reporting bugs
|
||||
-----------------
|
||||
|
||||
Naturally it is easiest for me if you already know what causes the
|
||||
unexpected behavior. Even better if you have a patch to propose.
|
||||
However, quite often the reason for unexpected behavior is unknown,
|
||||
so here are a few things to do before sending a bug report:
|
||||
|
||||
1. Try to create a small example how to reproduce the issue.
|
||||
|
||||
2. Compile XZ Utils with debugging code using configure switches
|
||||
--enable-debug and, if possible, --disable-shared. If you are
|
||||
using GCC, use CFLAGS='-O0 -ggdb3'. Don't strip the resulting
|
||||
binaries.
|
||||
|
||||
3. Turn on core dumps. The exact command depends on your shell;
|
||||
for example in GNU bash it is done with "ulimit -c unlimited",
|
||||
and in tcsh with "limit coredumpsize unlimited".
|
||||
|
||||
4. Try to reproduce the suspected bug. If you get "assertion failed"
|
||||
message, be sure to include the complete message in your bug
|
||||
report. If the application leaves a coredump, get a backtrace
|
||||
using gdb:
|
||||
$ gdb /path/to/app-binary # Load the app to the debugger.
|
||||
(gdb) core core # Open the coredump.
|
||||
(gdb) bt # Print the backtrace. Copy & paste to bug report.
|
||||
(gdb) quit # Quit gdb.
|
||||
|
||||
Report your bug via email or IRC (see Contact information below).
|
||||
Don't send core dump files or any executables. If you have a small
|
||||
example file(s) (total size less than 256 KiB), please include
|
||||
it/them as an attachment. If you have bigger test files, put them
|
||||
online somewhere and include an URL to the file(s) in the bug report.
|
||||
|
||||
Always include the exact version number of XZ Utils in the bug report.
|
||||
If you are using a snapshot from the git repository, use "git describe"
|
||||
to get the exact snapshot version. If you are using XZ Utils shipped
|
||||
in an operating system distribution, mention the distribution name,
|
||||
distribution version, and exact xz package version; if you cannot
|
||||
repeat the bug with the code compiled from unpatched source code,
|
||||
you probably need to report a bug to your distribution's bug tracking
|
||||
system.
|
||||
|
||||
|
||||
4. Translating the xz tool
|
||||
--------------------------
|
||||
|
||||
The messages from the xz tool have been translated into a few
|
||||
languages. Before starting to translate into a new language, ask
|
||||
the author that someone else hasn't already started working on it.
|
||||
|
||||
Test your translation. Testing includes comparing the translated
|
||||
output to the original English version by running the same commands
|
||||
in both your target locale and with LC_ALL=C. Ask someone to
|
||||
proof-read and test the translation.
|
||||
|
||||
Testing can be done e.g. by installing xz into a temporary directory:
|
||||
|
||||
./configure --disable-shared --prefix=/tmp/xz-test
|
||||
# <Edit the .po file in the po directory.>
|
||||
make -C po update-po
|
||||
make install
|
||||
bash debug/translations.bash | less
|
||||
bash debug/translations.bash | less -S # For --list outputs
|
||||
|
||||
Repeat the above as needed (no need to re-run configure though).
|
||||
|
||||
Note especially the following:
|
||||
|
||||
- The output of --help and --long-help must look nice on
|
||||
a 80-column terminal. It's OK to add extra lines if needed.
|
||||
|
||||
- In contrast, don't add extra lines to error messages and such.
|
||||
They are often preceded with e.g. a filename on the same line,
|
||||
so you have no way to predict where to put a \n. Let the terminal
|
||||
do the wrapping even if it looks ugly. Adding new lines will be
|
||||
even uglier in the generic case even if it looks nice in a few
|
||||
limited examples.
|
||||
|
||||
- Be careful with column alignment in tables and table-like output
|
||||
(--list, --list --verbose --verbose, --info-memory, --help, and
|
||||
--long-help):
|
||||
|
||||
* All descriptions of options in --help should start in the
|
||||
same column (but it doesn't need to be the same column as
|
||||
in the English messages; just be consistent if you change it).
|
||||
Check that both --help and --long-help look OK, since they
|
||||
share several strings.
|
||||
|
||||
* --list --verbose and --info-memory print lines that have
|
||||
the format "Description: %s". If you need a longer
|
||||
description, you can put extra space between the colon
|
||||
and %s. Then you may need to add extra space to other
|
||||
strings too so that the result as a whole looks good (all
|
||||
values start at the same column).
|
||||
|
||||
* The columns of the actual tables in --list --verbose --verbose
|
||||
should be aligned properly. Abbreviate if necessary. It might
|
||||
be good to keep at least 2 or 3 spaces between column headings
|
||||
and avoid spaces in the headings so that the columns stand out
|
||||
better, but this is a matter of opinion. Do what you think
|
||||
looks best.
|
||||
|
||||
- Be careful to put a period at the end of a sentence when the
|
||||
original version has it, and don't put it when the original
|
||||
doesn't have it. Similarly, be careful with \n characters
|
||||
at the beginning and end of the strings.
|
||||
|
||||
- Read the TRANSLATORS comments that have been extracted from the
|
||||
source code and included in xz.pot. If they suggest testing the
|
||||
translation with some type of command, do it. If testing needs
|
||||
input files, use e.g. tests/files/good-*.xz.
|
||||
|
||||
- When updating the translation, read the fuzzy (modified) strings
|
||||
carefully, and don't mark them as updated before you actually
|
||||
have updated them. Reading through the unchanged messages can be
|
||||
good too; sometimes you may find a better wording for them.
|
||||
|
||||
- If you find language problems in the original English strings,
|
||||
feel free to suggest improvements. Ask if something is unclear.
|
||||
|
||||
- The translated messages should be understandable (sometimes this
|
||||
may be a problem with the original English messages too). Don't
|
||||
make a direct word-by-word translation from English especially if
|
||||
the result doesn't sound good in your language.
|
||||
|
||||
In short, take your time and pay attention to the details. Making
|
||||
a good translation is not a quick and trivial thing to do. The
|
||||
translated xz should look as polished as the English version.
|
||||
|
||||
|
||||
5. Other implementations of the .xz format
|
||||
------------------------------------------
|
||||
|
||||
7-Zip and the p7zip port of 7-Zip support the .xz format starting
|
||||
from the version 9.00alpha.
|
||||
|
||||
http://7-zip.org/
|
||||
http://p7zip.sourceforge.net/
|
||||
|
||||
XZ Embedded is a limited implementation written for use in the Linux
|
||||
kernel, but it is also suitable for other embedded use.
|
||||
|
||||
http://tukaani.org/xz/embedded.html
|
||||
|
||||
|
||||
6. Contact information
|
||||
----------------------
|
||||
|
||||
If you have questions, bug reports, patches etc. related to XZ Utils,
|
||||
contact Lasse Collin <lasse.collin@tukaani.org> (in Finnish or English).
|
||||
I'm sometimes slow at replying. If you haven't got a reply within two
|
||||
weeks, assume that your email has got lost and resend it or use IRC.
|
||||
|
||||
You can find me also from #tukaani on Freenode; my nick is Larhzu.
|
||||
The channel tends to be pretty quiet, so just ask your question and
|
||||
someone may wake up.
|
||||
|
||||
|
||||
77
THANKS
77
THANKS
@@ -1,23 +1,84 @@
|
||||
|
||||
Thanks
|
||||
------
|
||||
======
|
||||
|
||||
Some people have helped more, some less, some don't even know they have
|
||||
been helpful, but nevertheless everyone's help has been important. :-)
|
||||
In alphabetical order:
|
||||
Some people have helped more, some less, but nevertheless everyone's help
|
||||
has been important. :-) In alphabetical order:
|
||||
- Mark Adler
|
||||
- H. Peter Anvin
|
||||
- Nelson H. F. Beebe
|
||||
- Karl Berry
|
||||
- Anders F. Björklund
|
||||
- Emmanuel Blot
|
||||
- Martin Blumenstingl
|
||||
- Jakub Bogusz
|
||||
- Maarten Bosmans
|
||||
- Trent W. Buck
|
||||
- David Burklund
|
||||
- Daniel Mealha Cabrita
|
||||
- Milo Casagrande
|
||||
- Marek Černocký
|
||||
- Andrew Dudman
|
||||
- Markus Duft
|
||||
- İsmail Dönmez
|
||||
- Jean-loup Gailly
|
||||
- Robert Elz
|
||||
- Gilles Espinasse
|
||||
- Denis Excoffier
|
||||
- Mike Frysinger
|
||||
- Jason Gorski
|
||||
- Juan Manuel Guerrero
|
||||
- Joachim Henke
|
||||
- Peter Ivanov
|
||||
- Jouk Jansen
|
||||
- Per Øyvind Karlsen
|
||||
- Thomas Klausner
|
||||
- Richard Koch
|
||||
- Ville Koskinen
|
||||
- Stephan Kulow
|
||||
- Peter Lawler
|
||||
- Hin-Tak Leung
|
||||
- Andraž 'ruskie' Levstik
|
||||
- Wim Lewis
|
||||
- Lorenzo De Liso
|
||||
- Gregory Margo
|
||||
- Jim Meyering
|
||||
- Rafał Mużyło
|
||||
- Adrien Nader
|
||||
- Hongbo Ni
|
||||
- Jonathan Nieder
|
||||
- Andre Noll
|
||||
- Peter O'Gorman
|
||||
- Igor Pavlov
|
||||
- Diego Elio Pettenò
|
||||
- Elbert Pol
|
||||
- Mikko Pouru
|
||||
- Robert Readman
|
||||
- Bernhard Reutner-Fischer
|
||||
- Cristian Rodríguez
|
||||
- Christian von Roques
|
||||
- Jukka Salmi
|
||||
- Alexandre Sauvé
|
||||
- Julian Seward
|
||||
- Andreas Schwab
|
||||
- Dan Shechter
|
||||
- Stuart Shelton
|
||||
- Jonathan Stott
|
||||
- Dan Stromberg
|
||||
- Paul Townsend
|
||||
- Mohammed Adnène Trojette
|
||||
- Alexey Tourbin
|
||||
- Patrick J. Volkerding
|
||||
- Martin Väth
|
||||
- Christian Weisgerber
|
||||
- Bert Wesarg
|
||||
- Ralf Wildenhues
|
||||
- Charles Wilson
|
||||
- Lars Wirzenius
|
||||
- Pilorz Wojciech
|
||||
- Ryan Young
|
||||
- Andreas Zieringer
|
||||
|
||||
Also thanks to all the people who have participated the Tukaani project
|
||||
and others who I have forgot.
|
||||
Also thanks to all the people who have participated in the Tukaani project.
|
||||
|
||||
I have probably forgot to add some names to the above list. Sorry about
|
||||
that and thanks for your help.
|
||||
|
||||
|
||||
130
TODO
130
TODO
@@ -1,109 +1,67 @@
|
||||
|
||||
LZMA Utils TODO List
|
||||
--------------------
|
||||
XZ Utils To-Do List
|
||||
===================
|
||||
|
||||
Major missing features
|
||||
Known bugs
|
||||
----------
|
||||
|
||||
Memory limits in the command line tool apply only to compression.
|
||||
The test suite is too incomplete.
|
||||
|
||||
Threading support in the lzma command line tool is still primitive.
|
||||
It cannot split a file in pieces yet.
|
||||
If the memory usage limit is less than about 13 MiB, xz is unable to
|
||||
automatically scale down the compression settings enough even though
|
||||
it would be possible by switching from BT2/BT3/BT4 match finder to
|
||||
HC3/HC4.
|
||||
|
||||
The --list mode isn't implemented in the command line tool.
|
||||
The code to detect number of CPU cores doesn't count hyperthreading
|
||||
as multiple cores. In context of xz, it probably should.
|
||||
Hyperthreading is good at least with p7zip.
|
||||
|
||||
Handling of Multi-Block Stream information should be separated
|
||||
from Stream encoder and decoder. Those would be useful to implement
|
||||
multi-threaded coding in applications.
|
||||
XZ Utils compress some files significantly worse than LZMA Utils.
|
||||
This is due to faster compression presets used by XZ Utils, and
|
||||
can often be worked around by using "xz --extreme". With some files
|
||||
--extreme isn't enough though: it's most likely with files that
|
||||
compress extremely well, so going from compression ratio of 0.003
|
||||
to 0.004 means big relative increase in the compressed file size.
|
||||
|
||||
Buffer to buffer coding is not implemented in liblzma. Probably
|
||||
a naive version should be written first, which would simply wrap
|
||||
things around lzma_stream. Later, there should be separate buffer
|
||||
coding functions, that are slightly faster (less memcpy()) and
|
||||
have smaller memory usage than the functions using lzma_stream.
|
||||
xz doesn't quote unprintable characters when it displays file names
|
||||
given on the command line.
|
||||
|
||||
libzfile is not implemented.
|
||||
tuklib_exit() doesn't block signals => EINTR is possible.
|
||||
|
||||
LZMA filter doesn't support predefined history buffer.
|
||||
SIGTSTP is not handled. If xz is stopped, the estimated remaining
|
||||
time and calculated (de)compression speed won't make sense in the
|
||||
progress indicator (xz --verbose).
|
||||
|
||||
|
||||
Security
|
||||
Missing features
|
||||
----------------
|
||||
|
||||
Search for bugs, especially security related issues. Security is
|
||||
important in every piece of code in LZMA Utils, but it is extremely
|
||||
important in the decoder part of liblzma.
|
||||
xz doesn't support copying extended attributes, access control
|
||||
lists etc. from source to target file.
|
||||
|
||||
Subblock: If there is LZMA as a Subfilter but without EOPM, can it
|
||||
trigger infinite loop when Subblock's "Unset Subfilter" flag is hit?
|
||||
Multithreaded compression
|
||||
|
||||
Similarly, can LZ decoder get stuck in infinite loop if the next
|
||||
filter in the chain returns LZMA_STREAM_END but the decoded data
|
||||
doesn't allow finishing the LZ decoding?
|
||||
Multithreaded decompression
|
||||
|
||||
Buffer-to-buffer coding could use less RAM (especially when
|
||||
decompressing LZMA1 or LZMA2).
|
||||
|
||||
Reliability
|
||||
I/O library is not implemented (similar to gzopen() in zlib).
|
||||
It will be a separate library that supports uncompressed, .gz,
|
||||
.bz2, .lzma, and .xz files.
|
||||
|
||||
Create a test suite to be run with "make check".
|
||||
|
||||
Should we use strlimit() and getrlimit() for memory usage limitting?
|
||||
|
||||
|
||||
Performance
|
||||
|
||||
Benchmark the CRC code on non-x86 CPUs. Won't have huge effect on
|
||||
overall speed, but it would still be nice to know what algorithm
|
||||
variant is the best on different CPUs.
|
||||
|
||||
|
||||
Third party support
|
||||
|
||||
Add support for LZMA to various applications. This naturally requires
|
||||
cooperating with the authors of the specific applications.
|
||||
* GNU grep and GNU diffutils: BSD grep already uses zlib directly
|
||||
instead of ugly shell scripts. It would be nice to get similar
|
||||
feature into relevant GNU tools. With libzfile, multiple
|
||||
compression formats would be easy to support.
|
||||
* kioslave for KDE
|
||||
* Magic for the `file' command
|
||||
* GNU Midnight Commander
|
||||
* GNU Texinfo
|
||||
* The `man' command
|
||||
* Package managers
|
||||
|
||||
Test the patches already written. The patches should be sent to
|
||||
upstream developers _once_ LZMA Utils APIs are stable enough (so
|
||||
people don't need to fix those patches all the time).
|
||||
|
||||
Mandriva has quite a few patches. Some of them are OK, some need
|
||||
adapting for new LZMA Utils.
|
||||
lzma_strerror() to convert lzma_ret to human readable form?
|
||||
This is tricky, because the same error codes are used with
|
||||
slightly different meanings, and this cannot be fixed anymore.
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
Revise the man page of lzma command line tool.
|
||||
Some tutorial is needed for liblzma. I have planned to write some
|
||||
extremely well commented example programs, which would work as
|
||||
a tutorial. I suppose the Doxygen tags are quite OK as a quick
|
||||
reference once one is familiar with the liblzma API.
|
||||
|
||||
If the Doxygen docs aren't enough, write good Texinfo manual for
|
||||
liblzma. It's been a long time I've even tried to build the Doxygen
|
||||
docs, so they may look quite bad at the moment.
|
||||
|
||||
Document LZMA as an algorithm. It would be great to have detailed
|
||||
description of the algorithm in English. Many people think, that
|
||||
reading the source code is not the optimal way to learn how LZMA
|
||||
works.
|
||||
|
||||
|
||||
Other
|
||||
|
||||
Some things return LZMA_PROG_ERROR with invalid options, some
|
||||
LZMA_HEADER_ERROR. These must be checked carefully and made so
|
||||
that LZMA_HEADER_ERROR is used only when the given option could
|
||||
make sense in future version of libzma.
|
||||
|
||||
lzma_restrict vs. restrict
|
||||
|
||||
Usage of LZMA_RUN vs. LZMA_FINISH with Metadata coders.
|
||||
|
||||
Port the Deflate implementation from 7-Zip into liblzma. 7-Zip's
|
||||
Deflate compresses better than zlib, gzip or Info-ZIP. I don't
|
||||
know if Deflate will be included in .lzma format (probably not),
|
||||
but it's still useful once we also add support for .gz file format.
|
||||
Document the LZMA1 and LZMA2 algorithms.
|
||||
|
||||
|
||||
52
autogen.sh
52
autogen.sh
@@ -1,38 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Author: Lasse Collin
|
||||
#
|
||||
# This file has been put into the public domain.
|
||||
# You can do whatever you want with this file.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
# The result of using "autoreconf -fi" should be identical to using this
|
||||
# script. I'm leaving this script here just in case someone finds it useful.
|
||||
|
||||
set -e -x
|
||||
|
||||
# autooint copies all kinds of crap even though we have told in
|
||||
# configure.ac that we don't want the intl directory. It is able
|
||||
# to omit the intl directory but still copies the m4 files needed
|
||||
# only by the stuff in the non-existing intl directory.
|
||||
autopoint -f
|
||||
rm -f \
|
||||
codeset.m4 \
|
||||
glibc2.m4 \
|
||||
glibc21.m4 \
|
||||
intdiv0.m4 \
|
||||
intl.m4 \
|
||||
intldir.m4 \
|
||||
intmax.m4 \
|
||||
inttypes-pri.m4 \
|
||||
inttypes_h.m4 \
|
||||
lcmessage.m4 \
|
||||
lock.m4 \
|
||||
longdouble.m4 \
|
||||
longlong.m4 \
|
||||
printf-posix.m4 \
|
||||
size_max.m4 \
|
||||
stdint_h.m4 \
|
||||
uintmax_t.m4 \
|
||||
ulonglong.m4 \
|
||||
visibility.m4 \
|
||||
wchar_t.m4 \
|
||||
wint_t.m4 \
|
||||
xsize.m4
|
||||
|
||||
libtoolize -c -f || glibtoolize -c -f
|
||||
aclocal -I m4
|
||||
autoconf
|
||||
autoheader
|
||||
automake -acf --foreign
|
||||
${AUTOPOINT:-autopoint} -f
|
||||
${LIBTOOLIZE:-libtoolize} -c -f || glibtoolize -c -f
|
||||
${ACLOCAL:-aclocal} -I m4
|
||||
${AUTOCONF:-autoconf}
|
||||
${AUTOHEADER:-autoheader}
|
||||
${AUTOMAKE:-automake} -acf --foreign
|
||||
|
||||
58
build-aux/manconv.sh
Normal file
58
build-aux/manconv.sh
Normal file
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
###############################################################################
|
||||
#
|
||||
# Wrapper for GNU groff to convert man pages to a few formats
|
||||
#
|
||||
# Usage: manconv.sh FORMAT [PAPER_SIZE] < in.1 > out.suffix
|
||||
#
|
||||
# FORMAT can be ascii, utf8, ps, or pdf. PAPER_SIZE can be anything that
|
||||
# groff accepts, e.g. a4 or letter. See groff_font(5). PAPER_SIZE defaults
|
||||
# to a4 and is used only when FORMAT is ps (PostScript) or pdf.
|
||||
#
|
||||
# Multiple man pages can be given at once e.g. to create a single PDF file
|
||||
# with continuous page numbering.
|
||||
#
|
||||
###############################################################################
|
||||
#
|
||||
# Author: Lasse Collin
|
||||
#
|
||||
# This file has been put into the public domain.
|
||||
# You can do whatever you want with this file.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
FORMAT=$1
|
||||
PAPER=${2-a4}
|
||||
|
||||
# Make PostScript and PDF output more readable:
|
||||
# - Use 11 pt font instead of the default 10 pt.
|
||||
# - Use larger paragraph spacing than the default 0.4v (man(7) only).
|
||||
FONT=11
|
||||
PD=0.8
|
||||
|
||||
SED_PD="
|
||||
/^\\.TH /s/\$/\\
|
||||
.PD $PD/
|
||||
s/^\\.PD\$/.PD $PD/"
|
||||
|
||||
case $FORMAT in
|
||||
ascii)
|
||||
groff -t -mandoc -Tascii | col -bx
|
||||
;;
|
||||
utf8)
|
||||
groff -t -mandoc -Tutf8 | col -bx
|
||||
;;
|
||||
ps)
|
||||
sed "$SED_PD" | groff -dpaper=$PAPER -t -mandoc \
|
||||
-rC1 -rS$FONT -Tps -P-p$PAPER
|
||||
;;
|
||||
pdf)
|
||||
sed "$SED_PD" | groff -dpaper=$PAPER -t -mandoc \
|
||||
-rC1 -rS$FONT -Tps -P-p$PAPER | ps2pdf - -
|
||||
;;
|
||||
*)
|
||||
echo 'Invalid arguments' >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
24
build-aux/version.sh
Normal file
24
build-aux/version.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
#############################################################################
|
||||
#
|
||||
# Get the version string from version.h and print it out without
|
||||
# trailing newline. This makes it suitable for use in configure.ac.
|
||||
#
|
||||
#############################################################################
|
||||
#
|
||||
# Author: Lasse Collin
|
||||
#
|
||||
# This file has been put into the public domain.
|
||||
# You can do whatever you want with this file.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
sed -n 's/LZMA_VERSION_STABILITY_ALPHA/alpha/
|
||||
s/LZMA_VERSION_STABILITY_BETA/beta/
|
||||
s/LZMA_VERSION_STABILITY_STABLE//
|
||||
s/^#define LZMA_VERSION_[MPS][AIT][AJNT][A-Z]* //p' \
|
||||
src/liblzma/api/lzma/version.h \
|
||||
| tr '\n' '|' \
|
||||
| sed 's/|/./; s/|/./; s/|//g' \
|
||||
| tr -d '\n'
|
||||
814
configure.ac
814
configure.ac
@@ -3,17 +3,10 @@
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Copyright (C) 2007 Lasse Collin
|
||||
# Author: Lasse Collin
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
# This file has been put into the public domain.
|
||||
# You can do whatever you want with this file.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
@@ -22,209 +15,202 @@
|
||||
# of malloc(), stat(), or lstat(), since we don't use those functions in
|
||||
# a way that would cause the problems the autoconf macros check.
|
||||
|
||||
AC_PREREQ(2.61)
|
||||
|
||||
# [LZMA] instead of [LZMA utils] since I prefer to have lzma-version.tar.gz
|
||||
# instead of lzma-utils-version.tar.gz.
|
||||
AC_INIT([LZMA], [4.42.2alpha], [lasse.collin@tukaani.org])
|
||||
AC_PREREQ([2.64])
|
||||
|
||||
AC_INIT([XZ Utils], m4_esyscmd([/bin/sh build-aux/version.sh]),
|
||||
[lasse.collin@tukaani.org], [xz], [http://tukaani.org/xz/])
|
||||
AC_CONFIG_SRCDIR([src/liblzma/common/common.h])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
|
||||
echo
|
||||
echo "LZMA Utils $PACKAGE_VERSION"
|
||||
echo "$PACKAGE_STRING"
|
||||
|
||||
echo
|
||||
echo "System type:"
|
||||
# This is needed to know if assembler optimizations can be used.
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
# We do some special things on Windows (32-bit or 64-bit) builds.
|
||||
case $host_os in
|
||||
mingw* | cygwin*) is_w32=yes ;;
|
||||
*) is_w32=no ;;
|
||||
esac
|
||||
AM_CONDITIONAL([COND_W32], [test "$is_w32" = yes])
|
||||
|
||||
# We need to use $EXEEXT with $(LN_S) when creating symlinks to
|
||||
# executables. Cygwin is an exception to this, since it is recommended
|
||||
# that symlinks don't have the .exe suffix. To make this work, we
|
||||
# define LN_EXEEXT.
|
||||
case $host_os in
|
||||
cygwin) LN_EXEEXT= ;;
|
||||
*) LN_EXEEXT='$(EXEEXT)' ;;
|
||||
esac
|
||||
AC_SUBST([LN_EXEEXT])
|
||||
|
||||
echo
|
||||
echo "Configure options:"
|
||||
AM_CFLAGS=
|
||||
|
||||
|
||||
#############
|
||||
# Debugging #
|
||||
#############
|
||||
|
||||
# Enable/disable debugging code:
|
||||
AC_MSG_CHECKING([if debugging code should be compiled])
|
||||
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable debugging code.]),
|
||||
AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug], [Enable debugging code.]),
|
||||
[], enable_debug=no)
|
||||
if test "x$enable_debug" = xyes; then
|
||||
CFLAGS="-g $CFLAGS"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_DEFINE(NDEBUG, 1, [Define to disable debugging code.])
|
||||
AC_DEFINE([NDEBUG], [1], [Define to 1 to disable debugging code.])
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
# Enable/disable the encoder components:
|
||||
AC_MSG_CHECKING([if encoder components should be built])
|
||||
AC_ARG_ENABLE(encoder, AC_HELP_STRING([--disable-encoder],
|
||||
[Do not build the encoder components.]),
|
||||
[], enable_encoder=yes)
|
||||
if test "x$enable_encoder" = xyes; then
|
||||
AC_DEFINE([HAVE_ENCODER], 1,
|
||||
[Define to 1 if encoder components are enabled.])
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AM_CONDITIONAL(COND_MAIN_ENCODER, test "x$enable_encoder" = xyes)
|
||||
|
||||
# Enable/disable the decoder components:
|
||||
AC_MSG_CHECKING([if decoder components should be built])
|
||||
AC_ARG_ENABLE(decoder, AC_HELP_STRING([--disable-decoder],
|
||||
[Do not build the decoder components.]),
|
||||
[], enable_decoder=yes)
|
||||
if test "x$enable_decoder" = xyes; then
|
||||
AC_DEFINE([HAVE_DECODER], 1,
|
||||
[Define to 1 if decoder components are enabled.])
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
if test "x$enable_encoder" = xno; then
|
||||
AC_MSG_ERROR([Do not disable both encoder and decoder.])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(COND_MAIN_DECODER, test "x$enable_decoder" = xyes)
|
||||
###########
|
||||
# Filters #
|
||||
###########
|
||||
|
||||
# Filters
|
||||
AC_MSG_CHECKING([which filters to build])
|
||||
AC_ARG_ENABLE(filters, AC_HELP_STRING([--enable-filters=],
|
||||
[Comma-separated list of filters to build. Default=all.
|
||||
Filters used in encoding are needed also in decoding.
|
||||
Available filters: copy subblock x86 powerpc ia64
|
||||
arm armthumb sparc delta lzma]),
|
||||
[], [enable_filters=copy,subblock,x86,powerpc,ia64,arm,armthumb,sparc,delta,lzma])
|
||||
enable_filters=`echo "$enable_filters" | sed 's/,/ /g'`
|
||||
enable_filters_copy=no
|
||||
enable_filters_subblock=no
|
||||
enable_filters_x86=no
|
||||
enable_filters_powerpc=no
|
||||
enable_filters_ia64=no
|
||||
enable_filters_arm=no
|
||||
enable_filters_armthumb=no
|
||||
enable_filters_sparc=no
|
||||
enable_filters_delta=no
|
||||
enable_filters_lzma=no
|
||||
enable_simple_filters=no
|
||||
if test "x$enable_filters" = xno || test "x$enable_filters" = x; then
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_ERROR([Please enable at least one filter.])
|
||||
m4_define([SUPPORTED_FILTERS], [lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,sparc])dnl
|
||||
m4_define([SIMPLE_FILTERS], [x86,powerpc,ia64,arm,armthumb,sparc])
|
||||
m4_define([LZ_FILTERS], [lzma1,lzma2])
|
||||
|
||||
m4_foreach([NAME], [SUPPORTED_FILTERS],
|
||||
[enable_filter_[]NAME=no
|
||||
enable_encoder_[]NAME=no
|
||||
enable_decoder_[]NAME=no
|
||||
])dnl
|
||||
|
||||
AC_MSG_CHECKING([which encoders to build])
|
||||
AC_ARG_ENABLE([encoders], AC_HELP_STRING([--enable-encoders=LIST],
|
||||
[Comma-separated list of encoders to build. Default=all.
|
||||
Available encoders:]
|
||||
m4_translit(m4_defn([SUPPORTED_FILTERS]), [,], [ ])),
|
||||
[], [enable_encoders=SUPPORTED_FILTERS])
|
||||
enable_encoders=`echo "$enable_encoders" | sed 's/,/ /g'`
|
||||
if test "x$enable_encoders" = xno || test "x$enable_encoders" = x; then
|
||||
AC_MSG_RESULT([(none)])
|
||||
else
|
||||
for arg in $enable_filters
|
||||
for arg in $enable_encoders
|
||||
do
|
||||
case $arg in
|
||||
copy)
|
||||
enable_filters_copy=yes
|
||||
AC_DEFINE([HAVE_FILTER_COPY], 1,
|
||||
[Define to 1 if support for the
|
||||
Copy filter is enabled.])
|
||||
;;
|
||||
subblock)
|
||||
enable_filters_subblock=yes
|
||||
AC_DEFINE([HAVE_FILTER_SUBBLOCK], 1,
|
||||
[Define to 1 if support for the
|
||||
Subblock filter is enabled.])
|
||||
;;
|
||||
x86)
|
||||
enable_filters_x86=yes
|
||||
enable_simple_filters=yes
|
||||
AC_DEFINE([HAVE_FILTER_X86], 1,
|
||||
[Define to 1 if support for the
|
||||
x86 (BCJ) filter is enabled.])
|
||||
;;
|
||||
powerpc)
|
||||
enable_filters_powerpc=yes
|
||||
enable_simple_filters=yes
|
||||
AC_DEFINE([HAVE_FILTER_POWERPC], 1,
|
||||
[Define to 1 if support for the
|
||||
PowerPC filter is enabled.])
|
||||
;;
|
||||
ia64)
|
||||
enable_filters_ia64=yes
|
||||
enable_simple_filters=yes
|
||||
AC_DEFINE([HAVE_FILTER_IA64], 1,
|
||||
[Define to 1 if support for the
|
||||
IA64 filter is enabled.])
|
||||
;;
|
||||
arm)
|
||||
enable_filters_arm=yes
|
||||
enable_simple_filters=yes
|
||||
AC_DEFINE([HAVE_FILTER_ARM], 1,
|
||||
[Define to 1 if support for the
|
||||
ARM filter is enabled.])
|
||||
;;
|
||||
armthumb)
|
||||
enable_filters_armthumb=yes
|
||||
enable_simple_filters=yes
|
||||
AC_DEFINE([HAVE_FILTER_ARMTHUMB], 1,
|
||||
[Define to 1 if support for the
|
||||
ARMThumb filter is enabled.])
|
||||
;;
|
||||
sparc)
|
||||
enable_filters_sparc=yes
|
||||
enable_simple_filters=yes
|
||||
AC_DEFINE([HAVE_FILTER_SPARC], 1,
|
||||
[Define to 1 if support for the
|
||||
SPARC filter is enabled.])
|
||||
;;
|
||||
delta)
|
||||
enable_filters_delta=yes
|
||||
AC_DEFINE([HAVE_FILTER_DELTA], 1,
|
||||
[Define to 1 if support for the
|
||||
Delta filter is enabled.])
|
||||
;;
|
||||
lzma)
|
||||
enable_filters_lzma=yes
|
||||
AC_DEFINE([HAVE_FILTER_LZMA], 1,
|
||||
[Define to 1 if support for the
|
||||
LZMA filter is enabled.])
|
||||
;;
|
||||
case $arg in m4_foreach([NAME], [SUPPORTED_FILTERS], [
|
||||
NAME)
|
||||
enable_filter_[]NAME=yes
|
||||
enable_encoder_[]NAME=yes
|
||||
AC_DEFINE(HAVE_ENCODER_[]m4_toupper(NAME), [1],
|
||||
[Define to 1 if] NAME [encoder is enabled.])
|
||||
;;])
|
||||
*)
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_ERROR([unknown filter: $arg])
|
||||
;;
|
||||
esac
|
||||
done
|
||||
AC_MSG_RESULT([$enable_filters])
|
||||
AC_MSG_RESULT([$enable_encoders])
|
||||
fi
|
||||
if test "x$enable_simple_filters" = xyes ; then
|
||||
AC_DEFINE([HAVE_FILTER_SIMPLE], 1, [Define to 1 if support for any
|
||||
of the so called simple filters is enabled.])
|
||||
fi
|
||||
AM_CONDITIONAL(COND_FILTER_COPY, test "x$enable_filters_copy" = xyes)
|
||||
AM_CONDITIONAL(COND_FILTER_SUBBLOCK, test "x$enable_filters_subblock" = xyes)
|
||||
AM_CONDITIONAL(COND_FILTER_X86, test "x$enable_filters_x86" = xyes)
|
||||
AM_CONDITIONAL(COND_FILTER_POWERPC, test "x$enable_filters_powerpc" = xyes)
|
||||
AM_CONDITIONAL(COND_FILTER_IA64, test "x$enable_filters_ia64" = xyes)
|
||||
AM_CONDITIONAL(COND_FILTER_ARM, test "x$enable_filters_arm" = xyes)
|
||||
AM_CONDITIONAL(COND_FILTER_ARMTHUMB, test "x$enable_filters_armthumb" = xyes)
|
||||
AM_CONDITIONAL(COND_FILTER_SPARC, test "x$enable_filters_sparc" = xyes)
|
||||
AM_CONDITIONAL(COND_FILTER_DELTA, test "x$enable_filters_delta" = xyes)
|
||||
AM_CONDITIONAL(COND_FILTER_LZMA, test "x$enable_filters_lzma" = xyes)
|
||||
AM_CONDITIONAL(COND_MAIN_SIMPLE, test "x$enable_simple_filters" = xyes)
|
||||
|
||||
# Which match finders should be enabled:
|
||||
AC_MSG_CHECKING([which decoders to build])
|
||||
AC_ARG_ENABLE([decoders], AC_HELP_STRING([--enable-decoders=LIST],
|
||||
[Comma-separated list of decoders to build. Default=all.
|
||||
Available decoders are the same as available encoders.]),
|
||||
[], [enable_decoders=SUPPORTED_FILTERS])
|
||||
enable_decoders=`echo "$enable_decoders" | sed 's/,/ /g'`
|
||||
if test "x$enable_decoders" = xno || test "x$enable_decoders" = x; then
|
||||
AC_MSG_RESULT([(none)])
|
||||
else
|
||||
for arg in $enable_decoders
|
||||
do
|
||||
case $arg in m4_foreach([NAME], [SUPPORTED_FILTERS], [
|
||||
NAME)
|
||||
enable_filter_[]NAME=yes
|
||||
enable_decoder_[]NAME=yes
|
||||
AC_DEFINE(HAVE_DECODER_[]m4_toupper(NAME), [1],
|
||||
[Define to 1 if] NAME [decoder is enabled.])
|
||||
;;])
|
||||
*)
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_ERROR([unknown filter: $arg])
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# LZMA2 requires that LZMA1 is enabled.
|
||||
test "x$enable_encoder_lzma2" = xyes && enable_encoder_lzma1=yes
|
||||
test "x$enable_decoder_lzma2" = xyes && enable_decoder_lzma1=yes
|
||||
|
||||
AC_MSG_RESULT([$enable_decoders])
|
||||
fi
|
||||
|
||||
if test "x$enable_encoder_lzma2$enable_encoder_lzma1" = xyesno \
|
||||
|| test "x$enable_decoder_lzma2$enable_decoder_lzma1" = xyesno; then
|
||||
AC_MSG_ERROR([LZMA2 requires that LZMA1 is also enabled.])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(COND_MAIN_ENCODER, test "x$enable_encoders" != xno && test "x$enable_encoders" != x)
|
||||
AM_CONDITIONAL(COND_MAIN_DECODER, test "x$enable_decoders" != xno && test "x$enable_decoders" != x)
|
||||
|
||||
m4_foreach([NAME], [SUPPORTED_FILTERS],
|
||||
[AM_CONDITIONAL(COND_FILTER_[]m4_toupper(NAME), test "x$enable_filter_[]NAME" = xyes)
|
||||
AM_CONDITIONAL(COND_ENCODER_[]m4_toupper(NAME), test "x$enable_encoder_[]NAME" = xyes)
|
||||
AM_CONDITIONAL(COND_DECODER_[]m4_toupper(NAME), test "x$enable_decoder_[]NAME" = xyes)
|
||||
])dnl
|
||||
|
||||
# The so called "simple filters" share common code.
|
||||
enable_filter_simple=no
|
||||
enable_encoder_simple=no
|
||||
enable_decoder_simple=no
|
||||
m4_foreach([NAME], [SIMPLE_FILTERS],
|
||||
[test "x$enable_filter_[]NAME" = xyes && enable_filter_simple=yes
|
||||
test "x$enable_encoder_[]NAME" = xyes && enable_encoder_simple=yes
|
||||
test "x$enable_decoder_[]NAME" = xyes && enable_decoder_simple=yes
|
||||
])dnl
|
||||
AM_CONDITIONAL(COND_FILTER_SIMPLE, test "x$enable_filter_simple" = xyes)
|
||||
AM_CONDITIONAL(COND_ENCODER_SIMPLE, test "x$enable_encoder_simple" = xyes)
|
||||
AM_CONDITIONAL(COND_DECODER_SIMPLE, test "x$enable_decoder_simple" = xyes)
|
||||
|
||||
# LZ-based filters share common code.
|
||||
enable_filter_lz=no
|
||||
enable_encoder_lz=no
|
||||
enable_decoder_lz=no
|
||||
m4_foreach([NAME], [LZ_FILTERS],
|
||||
[test "x$enable_filter_[]NAME" = xyes && enable_filter_lz=yes
|
||||
test "x$enable_encoder_[]NAME" = xyes && enable_encoder_lz=yes
|
||||
test "x$enable_decoder_[]NAME" = xyes && enable_decoder_lz=yes
|
||||
])dnl
|
||||
AM_CONDITIONAL(COND_FILTER_LZ, test "x$enable_filter_lz" = xyes)
|
||||
AM_CONDITIONAL(COND_ENCODER_LZ, test "x$enable_encoder_lz" = xyes)
|
||||
AM_CONDITIONAL(COND_DECODER_LZ, test "x$enable_decoder_lz" = xyes)
|
||||
|
||||
|
||||
#################
|
||||
# Match finders #
|
||||
#################
|
||||
|
||||
m4_define([SUPPORTED_MATCH_FINDERS], [hc3,hc4,bt2,bt3,bt4])
|
||||
|
||||
m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS],
|
||||
[enable_match_finder_[]NAME=no
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([which match finders to build])
|
||||
AC_ARG_ENABLE(match-finders, AC_HELP_STRING([--enable-match-finders=],
|
||||
AC_ARG_ENABLE([match-finders], AC_HELP_STRING([--enable-match-finders=LIST],
|
||||
[Comma-separated list of match finders to build. Default=all.
|
||||
At least one match finder is required for encoding with
|
||||
the LZMA filter.
|
||||
Available match finders: hc3 hc4 bt2 bt3 bt4]), [],
|
||||
[enable_match_finders=hc3,hc4,bt2,bt3,bt4])
|
||||
the LZMA1 and LZMA2 filters. Available match finders:]
|
||||
m4_translit(m4_defn([SUPPORTED_MATCH_FINDERS]), [,], [ ])), [],
|
||||
[enable_match_finders=SUPPORTED_MATCH_FINDERS])
|
||||
enable_match_finders=`echo "$enable_match_finders" | sed 's/,/ /g'`
|
||||
enable_match_finders_hc3=no
|
||||
enable_match_finders_hc4=no
|
||||
enable_match_finders_bt2=no
|
||||
enable_match_finders_bt3=no
|
||||
enable_match_finders_bt4=no
|
||||
if test "x$enable_encoder" = xyes && test "x$enable_filters_lzma" = xyes ; then
|
||||
if test "x$enable_encoder_lz" = xyes ; then
|
||||
for arg in $enable_match_finders
|
||||
do
|
||||
case $arg in
|
||||
hc3) enable_match_finders_hc3=yes ;;
|
||||
hc4) enable_match_finders_hc4=yes ;;
|
||||
bt2) enable_match_finders_bt2=yes ;;
|
||||
bt3) enable_match_finders_bt3=yes ;;
|
||||
bt4) enable_match_finders_bt4=yes ;;
|
||||
case $arg in m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS], [
|
||||
NAME)
|
||||
enable_match_finder_[]NAME=yes
|
||||
AC_DEFINE(HAVE_MF_[]m4_toupper(NAME), [1],
|
||||
[Define to 1 to enable] NAME [match finder.])
|
||||
;;])
|
||||
*)
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_ERROR([unknown match finder: $arg])
|
||||
@@ -233,48 +219,39 @@ if test "x$enable_encoder" = xyes && test "x$enable_filters_lzma" = xyes ; then
|
||||
done
|
||||
AC_MSG_RESULT([$enable_match_finders])
|
||||
else
|
||||
AC_MSG_RESULT([(none because not building the LZMA encoder)])
|
||||
AC_MSG_RESULT([(none because not building any LZ-based encoder)])
|
||||
fi
|
||||
AM_CONDITIONAL(COND_MF_HC3, test "x$enable_match_finders_hc3" = xyes)
|
||||
AM_CONDITIONAL(COND_MF_HC4, test "x$enable_match_finders_hc4" = xyes)
|
||||
AM_CONDITIONAL(COND_MF_BT2, test "x$enable_match_finders_bt2" = xyes)
|
||||
AM_CONDITIONAL(COND_MF_BT3, test "x$enable_match_finders_bt3" = xyes)
|
||||
AM_CONDITIONAL(COND_MF_BT4, test "x$enable_match_finders_bt4" = xyes)
|
||||
|
||||
# Which integrity checks to build
|
||||
|
||||
####################
|
||||
# Integrity checks #
|
||||
####################
|
||||
|
||||
m4_define([SUPPORTED_CHECKS], [crc32,crc64,sha256])
|
||||
|
||||
m4_foreach([NAME], [SUPPORTED_CHECKS],
|
||||
[enable_check_[]NAME=no
|
||||
])dnl
|
||||
|
||||
AC_MSG_CHECKING([which integrity checks to build])
|
||||
AC_ARG_ENABLE(checks, AC_HELP_STRING([--enable-checks=],
|
||||
AC_ARG_ENABLE([checks], AC_HELP_STRING([--enable-checks=LIST],
|
||||
[Comma-separated list of integrity checks to build.
|
||||
Default=all. Available integrity checks: crc32 crc64 sha256]),
|
||||
[], [enable_checks=crc32,crc64,sha256])
|
||||
Default=all. Available integrity checks:]
|
||||
m4_translit(m4_defn([SUPPORTED_CHECKS]), [,], [ ])),
|
||||
[], [enable_checks=SUPPORTED_CHECKS])
|
||||
enable_checks=`echo "$enable_checks" | sed 's/,/ /g'`
|
||||
enable_checks_crc32=no
|
||||
enable_checks_crc64=no
|
||||
enable_checks_sha256=no
|
||||
if test "x$enable_checks" = xno || test "x$enable_checks" = x; then
|
||||
AC_MSG_RESULT([(none)])
|
||||
else
|
||||
for arg in $enable_checks
|
||||
do
|
||||
case $arg in
|
||||
crc32)
|
||||
enable_checks_crc32=yes
|
||||
AC_DEFINE([HAVE_CHECK_CRC32], 1,
|
||||
[Define to 1 if CRC32 support
|
||||
is enabled.])
|
||||
;;
|
||||
crc64)
|
||||
enable_checks_crc64=yes
|
||||
AC_DEFINE([HAVE_CHECK_CRC64], 1,
|
||||
[Define to 1 if CRC64 support
|
||||
is enabled.])
|
||||
;;
|
||||
sha256)
|
||||
enable_checks_sha256=yes
|
||||
AC_DEFINE([HAVE_CHECK_SHA256], 1,
|
||||
[Define to 1 if SHA256 support
|
||||
is enabled.])
|
||||
;;
|
||||
case $arg in m4_foreach([NAME], [SUPPORTED_CHECKS], [
|
||||
NAME)
|
||||
enable_check_[]NAME=yes
|
||||
AC_DEFINE(HAVE_CHECK_[]m4_toupper(NAME), [1],
|
||||
[Define to 1 if] NAME
|
||||
[integrity check is enabled.])
|
||||
;;])
|
||||
*)
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_ERROR([unknown integrity check: $arg])
|
||||
@@ -286,41 +263,58 @@ fi
|
||||
if test "x$enable_checks_crc32" = xno ; then
|
||||
AC_MSG_ERROR([For now, the CRC32 check must always be enabled.])
|
||||
fi
|
||||
AM_CONDITIONAL(COND_CHECK_CRC32, test "x$enable_checks_crc32" = xyes)
|
||||
AM_CONDITIONAL(COND_CHECK_CRC64, test "x$enable_checks_crc64" = xyes)
|
||||
AM_CONDITIONAL(COND_CHECK_SHA256, test "x$enable_checks_sha256" = xyes)
|
||||
|
||||
# Assembler optimizations
|
||||
m4_foreach([NAME], [SUPPORTED_CHECKS],
|
||||
[AM_CONDITIONAL(COND_CHECK_[]m4_toupper(NAME), test "x$enable_check_[]NAME" = xyes)
|
||||
])dnl
|
||||
|
||||
|
||||
###########################
|
||||
# Assembler optimizations #
|
||||
###########################
|
||||
|
||||
AC_MSG_CHECKING([if assembler optimizations should be used])
|
||||
AC_ARG_ENABLE(assembler, AC_HELP_STRING([--disable-assembler],
|
||||
AC_ARG_ENABLE([assembler], AC_HELP_STRING([--disable-assembler],
|
||||
[Do not use assembler optimizations even if such exist
|
||||
for the architecture.]),
|
||||
[], [enable_assembler=yes])
|
||||
[], [enable_assembler=yes])
|
||||
if test "x$enable_assembler" = xyes; then
|
||||
case $host_cpu in
|
||||
i?86) enable_assembler=x86 ;;
|
||||
*) enable_assembler=no ;;
|
||||
enable_assembler=no
|
||||
case $host_os in
|
||||
# Darwin should work too but only if not creating universal
|
||||
# binaries. Solaris x86 could work too but I cannot test.
|
||||
linux* | *bsd* | mingw* | cygwin* | *djgpp*)
|
||||
case $host_cpu in
|
||||
i?86) enable_assembler=x86 ;;
|
||||
x86_64) enable_assembler=x86_64 ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $enable_assembler in
|
||||
x86|no) ;;
|
||||
x86 | x86_64 | no)
|
||||
AC_MSG_RESULT([$enable_assembler])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_ERROR([--enable-assembler accepts only \`yes', \`no', or \`x86'.])
|
||||
AC_MSG_ERROR([--enable-assembler accepts only \`yes', \`no', \`x86', or \`x86_64'.])
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT([$enable_assembler])
|
||||
AM_CONDITIONAL(COND_ASM_X86, test "x$enable_assembler" = xx86)
|
||||
AM_CONDITIONAL(COND_ASM_X86_64, test "x$enable_assembler" = xx86_64)
|
||||
|
||||
|
||||
#####################
|
||||
# Size optimization #
|
||||
#####################
|
||||
|
||||
# Size optimization
|
||||
AC_MSG_CHECKING([if small size is preferred over speed])
|
||||
AC_ARG_ENABLE(small, AC_HELP_STRING([--enable-small],
|
||||
[Omit precomputed tables to make liblzma a few kilobytes
|
||||
smaller. This will increase startup time of applications
|
||||
slightly, because the tables need to be computed first.]),
|
||||
[], [enable_small=no])
|
||||
AC_ARG_ENABLE([small], AC_HELP_STRING([--enable-small],
|
||||
[Make liblzma smaller and a little slower.
|
||||
This is disabled by default to optimize for speed.]),
|
||||
[], [enable_small=no])
|
||||
if test "x$enable_small" = xyes; then
|
||||
AC_DEFINE([HAVE_SMALL], 1, [Define to 1 if optimizing for size.])
|
||||
AC_DEFINE([HAVE_SMALL], [1], [Define to 1 if optimizing for size.])
|
||||
elif test "x$enable_small" != xno; then
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_ERROR([--enable-small accepts only \`yes' or \`no'])
|
||||
@@ -328,33 +322,132 @@ fi
|
||||
AC_MSG_RESULT([$enable_small])
|
||||
AM_CONDITIONAL(COND_SMALL, test "x$enable_small" = xyes)
|
||||
|
||||
echo
|
||||
echo "Initializing Automake:"
|
||||
|
||||
# There's no C++ or Fortran in LZMA Utils:
|
||||
CXX=no
|
||||
F77=no
|
||||
#############
|
||||
# Threading #
|
||||
#############
|
||||
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_MSG_CHECKING([if threading support is wanted])
|
||||
AC_ARG_ENABLE([threads], AC_HELP_STRING([--disable-threads],
|
||||
[Disable threading support.
|
||||
This makes some things thread-unsafe.]),
|
||||
[], [enable_threads=yes])
|
||||
if test "x$enable_threads" != xyes && test "x$enable_threads" != xno; then
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_ERROR([--enable-threads accepts only \`yes' or \`no'])
|
||||
fi
|
||||
AC_MSG_RESULT([$enable_threads])
|
||||
# We use the actual result a little later.
|
||||
|
||||
|
||||
#########################
|
||||
# Assumed amount of RAM #
|
||||
#########################
|
||||
|
||||
# We use 128 MiB as default, because it will allow decompressing files
|
||||
# created with "xz -9". It would be slightly safer to guess a lower value,
|
||||
# but most systems, on which we don't have any way to determine the amount
|
||||
# of RAM, will probably have at least 128 MiB of RAM.
|
||||
AC_MSG_CHECKING([how much RAM to assume if the real amount is unknown])
|
||||
AC_ARG_ENABLE([assume-ram], AC_HELP_STRING([--enable-assume-ram=SIZE],
|
||||
[If and only if the real amount of RAM cannot be determined,
|
||||
assume SIZE MiB. The default is 128 MiB. This affects the
|
||||
default memory usage limit.]),
|
||||
[], [enable_assume_ram=128])
|
||||
assume_ram_check=`echo "$enable_assume_ram" | tr -d 0123456789`
|
||||
if test -z "$enable_assume_ram" || test -n "$assume_ram_check"; then
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_ERROR([--enable-assume-ram accepts only an integer argument])
|
||||
fi
|
||||
AC_MSG_RESULT([$enable_assume_ram MiB])
|
||||
AC_DEFINE_UNQUOTED([ASSUME_RAM], [$enable_assume_ram],
|
||||
[How many MiB of RAM to assume if the real amount cannot
|
||||
be determined.])
|
||||
|
||||
|
||||
#########################
|
||||
# Components to install #
|
||||
#########################
|
||||
|
||||
AC_ARG_ENABLE([xz], [AC_HELP_STRING([--disable-xz],
|
||||
[do not build the xz tool])],
|
||||
[], [enable_xz=yes])
|
||||
AM_CONDITIONAL([COND_XZ], [test x$enable_xz != xno])
|
||||
|
||||
AC_ARG_ENABLE([xzdec], [AC_HELP_STRING([--disable-xzdec],
|
||||
[do not build xzdec])],
|
||||
[], [enable_xzdec=yes])
|
||||
AM_CONDITIONAL([COND_XZDEC], [test x$enable_xzdec != xno])
|
||||
|
||||
AC_ARG_ENABLE([lzmadec], [AC_HELP_STRING([--disable-lzmadec],
|
||||
[do not build lzmadec
|
||||
(it exists primarily for LZMA Utils compatibility)])],
|
||||
[], [enable_lzmadec=yes])
|
||||
AM_CONDITIONAL([COND_LZMADEC], [test x$enable_lzmadec != xno])
|
||||
|
||||
AC_ARG_ENABLE([lzmainfo], [AC_HELP_STRING([--disable-lzmainfo],
|
||||
[do not build lzmainfo
|
||||
(it exists primarily for LZMA Utils compatibility)])],
|
||||
[], [enable_lzmainfo=yes])
|
||||
AM_CONDITIONAL([COND_LZMAINFO], [test x$enable_lzmainfo != xno])
|
||||
|
||||
AC_ARG_ENABLE([lzma-links], [AC_HELP_STRING([--disable-lzma-links],
|
||||
[do not create symlinks for LZMA Utils compatibility])],
|
||||
[], [enable_lzma_links=yes])
|
||||
AM_CONDITIONAL([COND_LZMALINKS], [test x$enable_lzma_links != xno])
|
||||
|
||||
AC_ARG_ENABLE([scripts], [AC_HELP_STRING([--disable-scripts],
|
||||
[do not install the scripts xzdiff, xzgrep, xzless, xzmore,
|
||||
and their symlinks])],
|
||||
[], [enable_scripts=yes])
|
||||
AM_CONDITIONAL([COND_SCRIPTS], [test x$enable_scripts != xno])
|
||||
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
###############################################################################
|
||||
# Checks for programs.
|
||||
###############################################################################
|
||||
|
||||
AM_PROG_CC_C_O
|
||||
AM_PROG_AS
|
||||
AC_PROG_LN_S
|
||||
echo
|
||||
gl_POSIX_SHELL
|
||||
if test -z "$POSIX_SHELL" ; then
|
||||
AC_MSG_ERROR([No POSIX conforming shell (sh) was found.])
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Threading support:"
|
||||
ACX_PTHREAD
|
||||
CC="$PTHREAD_CC"
|
||||
echo "Initializing Automake:"
|
||||
|
||||
AM_INIT_AUTOMAKE([1.10 foreign tar-v7 filename-length-max=99])
|
||||
AC_PROG_LN_S
|
||||
|
||||
AC_PROG_CC_C99
|
||||
if test x$ac_cv_prog_cc_c99 = xno ; then
|
||||
AC_MSG_ERROR([No C99 compiler was found.])
|
||||
fi
|
||||
|
||||
AM_PROG_CC_C_O
|
||||
AM_PROG_AS
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
if test "x$enable_threads" = xyes; then
|
||||
echo
|
||||
echo "Threading support:"
|
||||
ACX_PTHREAD
|
||||
LIBS="$LIBS $PTHREAD_LIBS"
|
||||
AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
|
||||
CC="$PTHREAD_CC"
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Initializing Libtool:"
|
||||
AC_PROG_LIBTOOL
|
||||
LT_PREREQ([2.2])
|
||||
LT_INIT([win32-dll])
|
||||
LT_LANG([Windows Resource])
|
||||
|
||||
# This is a bit wrong since it is possible to request that only some libs
|
||||
# are built as shared. Using that feature isn't so common though, and this
|
||||
# breaks only on Windows (at least for now) if the user enables only some
|
||||
# libs as shared.
|
||||
AM_CONDITIONAL([COND_SHARED], [test "x$enable_shared" != xno])
|
||||
|
||||
|
||||
###############################################################################
|
||||
@@ -379,34 +472,38 @@ AC_CHECK_HEADERS([fcntl.h limits.h sys/time.h],
|
||||
[],
|
||||
[AC_MSG_ERROR([Required header file(s) are missing.])])
|
||||
|
||||
# If any of these headers are missing, things should still work correctly:
|
||||
AC_CHECK_HEADERS([assert.h errno.h byteswap.h sys/param.h sys/sysctl.h],
|
||||
[], [], [
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
###############################################################################
|
||||
|
||||
dnl We don't need these as long as we need a C99 compiler anyway.
|
||||
dnl AC_C_INLINE
|
||||
dnl AC_C_RESTRICT
|
||||
|
||||
AC_HEADER_STDBOOL
|
||||
AC_C_INLINE
|
||||
AC_C_RESTRICT
|
||||
|
||||
AC_TYPE_UINT8_T
|
||||
AC_TYPE_UINT16_T
|
||||
AC_TYPE_INT32_T
|
||||
AC_TYPE_UINT32_T
|
||||
AC_TYPE_INT64_T
|
||||
AC_TYPE_UINT64_T
|
||||
AC_TYPE_UINTPTR_T
|
||||
|
||||
AC_CHECK_SIZEOF([size_t])
|
||||
|
||||
# The command line tool can copy high resolution timestamps if such
|
||||
# information is availabe in struct stat. Otherwise one second accuracy
|
||||
# is used. Most systems seem to have st_xtim but BSDs have st_xtimespec.
|
||||
AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec, struct stat.st_mtim.tv_nsec,
|
||||
struct stat.st_atimespec.tv_nsec, struct stat.st_mtimespec.tv_nsec])
|
||||
# is used.
|
||||
AC_CHECK_MEMBERS([
|
||||
struct stat.st_atim.tv_nsec,
|
||||
struct stat.st_atimespec.tv_nsec,
|
||||
struct stat.st_atimensec,
|
||||
struct stat.st_uatime,
|
||||
struct stat.st_atim.st__tim.tv_nsec])
|
||||
|
||||
# It is very unlikely that you want to build liblzma without
|
||||
# large file support.
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
# At the moment, the only endian-dependent part should be the integrity checks.
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
|
||||
@@ -417,124 +514,35 @@ AC_C_BIGENDIAN
|
||||
# Gnulib replacements as needed
|
||||
gl_GETOPT
|
||||
|
||||
# Functions that are not mandatory i.e. we have alternatives for them
|
||||
# or we can just drop some functionality:
|
||||
AC_CHECK_FUNCS([memcpy memmove memset futimes futimesat])
|
||||
# Find the best function to set timestamps.
|
||||
AC_CHECK_FUNCS([futimens futimes futimesat utimes utime], [break])
|
||||
|
||||
# Check how to find out the amount of physical memory in the system. The
|
||||
# lzma command line tool uses this to automatically limits its memory usage.
|
||||
# - sysconf() gives all the needed info on GNU+Linux and Solaris.
|
||||
# - BSDs use sysctl().
|
||||
AC_MSG_CHECKING([how to detect the amount of physical memory])
|
||||
AC_COMPILE_IFELSE([
|
||||
#include <unistd.h>
|
||||
int
|
||||
main()
|
||||
{
|
||||
long i;
|
||||
i = sysconf(_SC_PAGESIZE);
|
||||
i = sysconf(_SC_PHYS_PAGES);
|
||||
return 0;
|
||||
}
|
||||
], [
|
||||
AC_DEFINE([HAVE_PHYSMEM_SYSCONF], 1,
|
||||
[Define to 1 if the amount of physical memory can be detected
|
||||
with sysconf(_SC_PAGESIZE) and sysconf(_SC_PHYS_PAGES).])
|
||||
AC_MSG_RESULT([sysconf])
|
||||
], [
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
#include <sys/sysctl.h>
|
||||
int
|
||||
main()
|
||||
{
|
||||
int name[2] = { CTL_HW, HW_PHYSMEM };
|
||||
unsigned long mem;
|
||||
size_t mem_ptr_size = sizeof(mem);
|
||||
sysctl(name, 2, &mem, &mem_ptr_size, NULL, NULL);
|
||||
return 0;
|
||||
}
|
||||
]])], [
|
||||
AC_DEFINE([HAVE_PHYSMEM_SYSCTL], 1,
|
||||
[Define to 1 if the amount of physical memory can be detected
|
||||
with sysctl().])
|
||||
AC_MSG_RESULT([sysctl])
|
||||
], [
|
||||
AC_MSG_RESULT([unknown])
|
||||
])])
|
||||
|
||||
# Check how to find out the number of available CPU cores in the system.
|
||||
# sysconf(_SC_NPROCESSORS_ONLN) works on most systems, except that BSDs
|
||||
# use sysctl().
|
||||
AC_MSG_CHECKING([how to detect the number of available CPU cores])
|
||||
AC_COMPILE_IFELSE([
|
||||
#include <unistd.h>
|
||||
int
|
||||
main()
|
||||
{
|
||||
long i;
|
||||
i = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
return 0;
|
||||
}
|
||||
], [
|
||||
AC_DEFINE([HAVE_NCPU_SYSCONF], 1,
|
||||
[Define to 1 if the number of available CPU cores can be
|
||||
detected with sysconf(_SC_NPROCESSORS_ONLN).])
|
||||
AC_MSG_RESULT([sysconf])
|
||||
], [
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
#include <sys/sysctl.h>
|
||||
int
|
||||
main()
|
||||
{
|
||||
int name[2] = { CTL_HW, HW_NCPU };
|
||||
int cpus;
|
||||
size_t cpus_size = sizeof(cpus);
|
||||
sysctl(name, 2, &cpus, &cpus_size, NULL, NULL);
|
||||
return 0;
|
||||
}
|
||||
]])], [
|
||||
AC_DEFINE([HAVE_NCPU_SYSCTL], 1,
|
||||
[Define to 1 if the number of available CPU cores can be
|
||||
detected with sysctl().])
|
||||
AC_MSG_RESULT([sysctl])
|
||||
], [
|
||||
AC_MSG_RESULT([unknown])
|
||||
])])
|
||||
TUKLIB_PROGNAME
|
||||
TUKLIB_INTEGER
|
||||
TUKLIB_PHYSMEM
|
||||
TUKLIB_CPUCORES
|
||||
TUKLIB_MBSTR
|
||||
|
||||
|
||||
###############################################################################
|
||||
# If using GCC, set some additional CFLAGS:
|
||||
# If using GCC, set some additional AM_CFLAGS:
|
||||
###############################################################################
|
||||
|
||||
Wno_uninitialized=no
|
||||
|
||||
if test -n "$GCC" ; then
|
||||
if test "$GCC" = yes ; then
|
||||
echo
|
||||
echo "GCC extensions:"
|
||||
gl_VISIBILITY
|
||||
if test -n "$CFLAG_VISIBILITY" ; then
|
||||
CFLAGS="$CFLAG_VISIBILITY $CFLAGS"
|
||||
fi
|
||||
fi
|
||||
|
||||
# -Wno-uninitialized is needed with -Werror with SHA256 code
|
||||
# to omit a bogus warning.
|
||||
AC_MSG_CHECKING([if $CC accepts -Wno-uninitialized])
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Wno-uninitialized"
|
||||
AC_COMPILE_IFELSE([void foo(void) { }], [Wno_uninitialized=yes])
|
||||
CFLAGS="$OLD_CFLAGS"
|
||||
AC_MSG_RESULT([$Wno_uninitialized])
|
||||
# Always do the visibility check but don't set AM_CFLAGS on Windows.
|
||||
# This way things get set properly even on Windows.
|
||||
gl_VISIBILITY
|
||||
if test -n "$CFLAG_VISIBILITY" && test "$is_w32" = no; then
|
||||
AM_CFLAGS="$AM_CFLAGS $CFLAG_VISIBILITY"
|
||||
fi
|
||||
|
||||
if test "$GCC" = yes ; then
|
||||
# Enable as much warnings as possible. These commented warnings won't
|
||||
# work for LZMA Utils though:
|
||||
# work for this package though:
|
||||
# * -Wunreachable-code breaks several assert(0) cases, which are
|
||||
# backed up with "return LZMA_PROG_ERROR".
|
||||
# * -Wcast-qual would break various things where we need a non-const
|
||||
@@ -545,23 +553,38 @@ if test -n "$GCC" ; then
|
||||
# * -Winline, -Wdisabled-optimization, -Wunsafe-loop-optimizations
|
||||
# don't seem so useful here; at least the last one gives some
|
||||
# warnings which are not bugs.
|
||||
for NEW_FLAG in -Wextra -Wformat=2 -Winit-self -Wstrict-aliasing=2 \
|
||||
-Wfloat-equal -Wshadow -Wpointer-arith \
|
||||
-Wbad-function-cast -Wwrite-strings \
|
||||
-Waggregate-return -Wstrict-prototypes \
|
||||
-Wold-style-definition -Wmissing-prototypes \
|
||||
-Wmissing-declarations -Wmissing-noreturn \
|
||||
for NEW_FLAG in \
|
||||
-Wall \
|
||||
-Wextra \
|
||||
-Wformat=2 \
|
||||
-Winit-self \
|
||||
-Wmissing-include-dirs \
|
||||
-Wstrict-aliasing \
|
||||
-Wfloat-equal \
|
||||
-Wundef \
|
||||
-Wshadow \
|
||||
-Wpointer-arith \
|
||||
-Wbad-function-cast \
|
||||
-Wwrite-strings \
|
||||
-Wlogical-op \
|
||||
-Waggregate-return \
|
||||
-Wstrict-prototypes \
|
||||
-Wold-style-definition \
|
||||
-Wmissing-prototypes \
|
||||
-Wmissing-declarations \
|
||||
-Wmissing-noreturn \
|
||||
-Wredundant-decls
|
||||
do
|
||||
AC_MSG_CHECKING([if $CC accepts $NEW_FLAG])
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$NEW_FLAG $CFLAGS"
|
||||
AC_COMPILE_IFELSE([void foo(void) { }], [
|
||||
CFLAGS="$CFLAGS $NEW_FLAG"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([void foo(void) { }])], [
|
||||
AM_CFLAGS="$AM_CFLAGS $NEW_FLAG"
|
||||
AC_MSG_RESULT([yes])
|
||||
], [
|
||||
CFLAGS="$OLD_CFLAGS"
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
CFLAGS="$OLD_CFLAGS"
|
||||
done
|
||||
|
||||
AC_ARG_ENABLE([werror],
|
||||
@@ -569,15 +592,10 @@ if test -n "$GCC" ; then
|
||||
compilation on all compiler warnings.]),
|
||||
[], [enable_werror=no])
|
||||
if test "x$enable_werror" = "xyes"; then
|
||||
CFLAGS="-Werror $CFLAGS"
|
||||
AM_CFLAGS="$AM_CFLAGS -Werror"
|
||||
fi
|
||||
|
||||
# IIRC these work with all GCC versions that support -std=c99:
|
||||
CFLAGS="-std=c99 -pedantic -Wall $CFLAGS"
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([COND_WNO_UNINITIALIZED], test "x$Wno_uninitialized" = "xyes")
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Create the makefiles and config.h
|
||||
@@ -589,26 +607,48 @@ echo
|
||||
# functions.
|
||||
AM_CONDITIONAL([COND_GNULIB], test -n "$LIBOBJS")
|
||||
|
||||
# Add default AM_CFLAGS.
|
||||
AC_SUBST([AM_CFLAGS])
|
||||
|
||||
# This is needed for src/scripts.
|
||||
xz=`echo xz | sed "$program_transform_name"`
|
||||
AC_SUBST([xz])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Doxyfile
|
||||
Makefile
|
||||
po/Makefile.in
|
||||
lib/Makefile
|
||||
src/Makefile
|
||||
src/liblzma/lzma.pc
|
||||
src/liblzma/liblzma.pc
|
||||
src/liblzma/Makefile
|
||||
src/liblzma/api/Makefile
|
||||
src/liblzma/common/Makefile
|
||||
src/liblzma/check/Makefile
|
||||
src/liblzma/lz/Makefile
|
||||
src/liblzma/lzma/Makefile
|
||||
src/liblzma/simple/Makefile
|
||||
src/liblzma/subblock/Makefile
|
||||
src/liblzma/rangecoder/Makefile
|
||||
src/lzma/Makefile
|
||||
src/lzmadec/Makefile
|
||||
src/xz/Makefile
|
||||
src/xzdec/Makefile
|
||||
src/lzmainfo/Makefile
|
||||
src/scripts/Makefile
|
||||
src/scripts/xzdiff
|
||||
src/scripts/xzgrep
|
||||
src/scripts/xzmore
|
||||
src/scripts/xzless
|
||||
tests/Makefile
|
||||
debug/Makefile
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
# Some warnings
|
||||
if test x$tuklib_cv_physmem_method = xunknown; then
|
||||
echo
|
||||
echo "WARNING:"
|
||||
echo "No supported method to detect the amount of RAM."
|
||||
echo "Consider using --enable-assume-ram (if you didn't already)"
|
||||
echo "or make a patch to add support for this operating system."
|
||||
fi
|
||||
|
||||
# Not threading yet so don't warn.
|
||||
#if test x$tuklib_cv_cpucores_method = xunknown; then
|
||||
# echo
|
||||
# echo "WARNING:"
|
||||
# echo "No supported method to detect the number of CPU cores."
|
||||
#fi
|
||||
|
||||
27
debug/Makefile.am
Normal file
27
debug/Makefile.am
Normal file
@@ -0,0 +1,27 @@
|
||||
##
|
||||
## Author: Lasse Collin
|
||||
##
|
||||
## This file has been put into the public domain.
|
||||
## You can do whatever you want with this file.
|
||||
##
|
||||
|
||||
noinst_PROGRAMS = \
|
||||
repeat \
|
||||
sync_flush \
|
||||
full_flush \
|
||||
memusage \
|
||||
crc32 \
|
||||
known_sizes \
|
||||
hex2bin
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src/common \
|
||||
-I$(top_srcdir)/src/liblzma/api
|
||||
|
||||
LDADD = $(top_builddir)/src/liblzma/liblzma.la
|
||||
|
||||
if COND_GNULIB
|
||||
LDADD += $(top_builddir)/lib/libgnu.a
|
||||
endif
|
||||
|
||||
LDADD += $(LTLIBINTL)
|
||||
17
debug/README
Normal file
17
debug/README
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
Debug tools
|
||||
-----------
|
||||
|
||||
This directory contains a few tiny programs that may be helpful when
|
||||
debugging LZMA Utils.
|
||||
|
||||
These tools are not meant to be installed. Often one needs to edit
|
||||
the source code a little to make the programs do the wanted things.
|
||||
If you don't know how these programs could help you, it is likely
|
||||
that they really are useless to you.
|
||||
|
||||
These aren't intended to be used as example programs. They take some
|
||||
shortcuts here and there, which correct programs should not do. Many
|
||||
possible errors (especially I/O errors) are ignored. Don't report
|
||||
bugs or send patches to fix this kind of bugs.
|
||||
|
||||
39
debug/crc32.c
Normal file
39
debug/crc32.c
Normal file
@@ -0,0 +1,39 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file crc32.c
|
||||
/// \brief Primitive CRC32 calculation tool
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "sysdefs.h"
|
||||
#include "lzma.h"
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
uint32_t crc = 0;
|
||||
|
||||
do {
|
||||
uint8_t buf[BUFSIZ];
|
||||
const size_t size = fread(buf, 1, sizeof(buf), stdin);
|
||||
crc = lzma_crc32(buf, size, crc);
|
||||
} while (!ferror(stdin) && !feof(stdin));
|
||||
|
||||
//printf("%08" PRIX32 "\n", crc);
|
||||
|
||||
// I want it little endian so it's easy to work with hex editor.
|
||||
printf("%02" PRIX32 " ", crc & 0xFF);
|
||||
printf("%02" PRIX32 " ", (crc >> 8) & 0xFF);
|
||||
printf("%02" PRIX32 " ", (crc >> 16) & 0xFF);
|
||||
printf("%02" PRIX32 " ", crc >> 24);
|
||||
printf("\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
102
debug/full_flush.c
Normal file
102
debug/full_flush.c
Normal file
@@ -0,0 +1,102 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file full_flush.c
|
||||
/// \brief Encode files using LZMA_FULL_FLUSH
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "sysdefs.h"
|
||||
#include "lzma.h"
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
static lzma_stream strm = LZMA_STREAM_INIT;
|
||||
static FILE *file_in;
|
||||
|
||||
|
||||
static void
|
||||
encode(size_t size, lzma_action action)
|
||||
{
|
||||
static const size_t CHUNK = 64;
|
||||
uint8_t in[CHUNK];
|
||||
uint8_t out[CHUNK];
|
||||
lzma_ret ret;
|
||||
|
||||
do {
|
||||
if (strm.avail_in == 0 && size > 0) {
|
||||
const size_t amount = my_min(size, CHUNK);
|
||||
strm.avail_in = fread(in, 1, amount, file_in);
|
||||
strm.next_in = in;
|
||||
size -= amount; // Intentionally not using avail_in.
|
||||
}
|
||||
|
||||
strm.next_out = out;
|
||||
strm.avail_out = CHUNK;
|
||||
|
||||
ret = lzma_code(&strm, size == 0 ? action : LZMA_RUN);
|
||||
|
||||
if (ret != LZMA_OK && ret != LZMA_STREAM_END) {
|
||||
fprintf(stderr, "%s:%u: %s: ret == %d\n",
|
||||
__FILE__, __LINE__, __func__, ret);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
fwrite(out, 1, CHUNK - strm.avail_out, stdout);
|
||||
|
||||
} while (size > 0 || strm.avail_out == 0);
|
||||
|
||||
if ((action == LZMA_RUN && ret != LZMA_OK)
|
||||
|| (action != LZMA_RUN && ret != LZMA_STREAM_END)) {
|
||||
fprintf(stderr, "%s:%u: %s: ret == %d\n",
|
||||
__FILE__, __LINE__, __func__, ret);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
file_in = argc > 1 ? fopen(argv[1], "rb") : stdin;
|
||||
|
||||
|
||||
// Config
|
||||
lzma_options_lzma opt_lzma;
|
||||
if (lzma_lzma_preset(&opt_lzma, 1)) {
|
||||
fprintf(stderr, "preset failed\n");
|
||||
exit(1);
|
||||
}
|
||||
lzma_filter filters[LZMA_FILTERS_MAX + 1];
|
||||
filters[0].id = LZMA_FILTER_LZMA2;
|
||||
filters[0].options = &opt_lzma;
|
||||
filters[1].id = LZMA_VLI_UNKNOWN;
|
||||
|
||||
// Init
|
||||
if (lzma_stream_encoder(&strm, filters, LZMA_CHECK_CRC32) != LZMA_OK) {
|
||||
fprintf(stderr, "init failed\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// if (lzma_easy_encoder(&strm, 1)) {
|
||||
// fprintf(stderr, "init failed\n");
|
||||
// exit(1);
|
||||
// }
|
||||
|
||||
// Encoding
|
||||
encode(0, LZMA_FULL_FLUSH);
|
||||
encode(6, LZMA_FULL_FLUSH);
|
||||
encode(0, LZMA_FULL_FLUSH);
|
||||
encode(7, LZMA_FULL_FLUSH);
|
||||
encode(0, LZMA_FULL_FLUSH);
|
||||
encode(0, LZMA_FINISH);
|
||||
|
||||
// Clean up
|
||||
lzma_end(&strm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
53
debug/hex2bin.c
Normal file
53
debug/hex2bin.c
Normal file
@@ -0,0 +1,53 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file hex2bin.c
|
||||
/// \brief Converts hexadecimal input strings to binary
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "sysdefs.h"
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
static int
|
||||
getbin(int x)
|
||||
{
|
||||
if (x >= '0' && x <= '9')
|
||||
return x - '0';
|
||||
|
||||
if (x >= 'A' && x <= 'F')
|
||||
return x - 'A' + 10;
|
||||
|
||||
return x - 'a' + 10;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
while (true) {
|
||||
int byte = getchar();
|
||||
if (byte == EOF)
|
||||
return 0;
|
||||
if (!isxdigit(byte))
|
||||
continue;
|
||||
|
||||
const int digit = getchar();
|
||||
if (digit == EOF || !isxdigit(digit)) {
|
||||
fprintf(stderr, "Invalid input\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
byte = (getbin(byte) << 4) | getbin(digit);
|
||||
if (putchar(byte) == EOF) {
|
||||
perror(NULL);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
129
debug/known_sizes.c
Normal file
129
debug/known_sizes.c
Normal file
@@ -0,0 +1,129 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file known_sizes.c
|
||||
/// \brief Encodes .lzma Stream with sizes known in Block Header
|
||||
///
|
||||
/// The input file is encoded in RAM, and the known Compressed Size
|
||||
/// and/or Uncompressed Size values are stored in the Block Header.
|
||||
/// As of writing there's no such Stream encoder in liblzma.
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "sysdefs.h"
|
||||
#include "lzma.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/unistd.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
// Support file sizes up to 1 MiB. We use this for output space too, so files
|
||||
// close to 1 MiB had better compress at least a little or we have a buffer
|
||||
// overflow.
|
||||
#define BUFFER_SIZE (1U << 20)
|
||||
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
// Allocate the buffers.
|
||||
uint8_t *in = malloc(BUFFER_SIZE);
|
||||
uint8_t *out = malloc(BUFFER_SIZE);
|
||||
if (in == NULL || out == NULL)
|
||||
return 1;
|
||||
|
||||
// Fill the input buffer.
|
||||
const size_t in_size = fread(in, 1, BUFFER_SIZE, stdin);
|
||||
|
||||
// Filter setup
|
||||
lzma_options_lzma opt_lzma;
|
||||
if (lzma_lzma_preset(&opt_lzma, 1))
|
||||
return 1;
|
||||
|
||||
lzma_filter filters[] = {
|
||||
{
|
||||
.id = LZMA_FILTER_LZMA2,
|
||||
.options = &opt_lzma
|
||||
},
|
||||
{
|
||||
.id = LZMA_VLI_UNKNOWN
|
||||
}
|
||||
};
|
||||
|
||||
lzma_block block = {
|
||||
.check = LZMA_CHECK_CRC32,
|
||||
.compressed_size = BUFFER_SIZE, // Worst case reserve
|
||||
.uncompressed_size = in_size,
|
||||
.filters = filters,
|
||||
};
|
||||
|
||||
lzma_stream strm = LZMA_STREAM_INIT;
|
||||
if (lzma_block_encoder(&strm, &block) != LZMA_OK)
|
||||
return 1;
|
||||
|
||||
// Reserve space for Stream Header and Block Header. We need to
|
||||
// calculate the size of the Block Header first.
|
||||
if (lzma_block_header_size(&block) != LZMA_OK)
|
||||
return 1;
|
||||
|
||||
size_t out_size = LZMA_STREAM_HEADER_SIZE + block.header_size;
|
||||
|
||||
strm.next_in = in;
|
||||
strm.avail_in = in_size;
|
||||
strm.next_out = out + out_size;
|
||||
strm.avail_out = BUFFER_SIZE - out_size;
|
||||
|
||||
if (lzma_code(&strm, LZMA_FINISH) != LZMA_STREAM_END)
|
||||
return 1;
|
||||
|
||||
out_size += strm.total_out;
|
||||
|
||||
if (lzma_block_header_encode(&block, out + LZMA_STREAM_HEADER_SIZE)
|
||||
!= LZMA_OK)
|
||||
return 1;
|
||||
|
||||
lzma_index *idx = lzma_index_init(NULL);
|
||||
if (idx == NULL)
|
||||
return 1;
|
||||
|
||||
if (lzma_index_append(idx, NULL, block.header_size + strm.total_out,
|
||||
strm.total_in) != LZMA_OK)
|
||||
return 1;
|
||||
|
||||
if (lzma_index_encoder(&strm, idx) != LZMA_OK)
|
||||
return 1;
|
||||
|
||||
if (lzma_code(&strm, LZMA_RUN) != LZMA_STREAM_END)
|
||||
return 1;
|
||||
|
||||
out_size += strm.total_out;
|
||||
|
||||
lzma_end(&strm);
|
||||
|
||||
lzma_index_end(idx, NULL);
|
||||
|
||||
// Encode the Stream Header and Stream Footer. backwards_size is
|
||||
// needed only for the Stream Footer.
|
||||
lzma_stream_flags sf = {
|
||||
.backward_size = strm.total_out,
|
||||
.check = block.check,
|
||||
};
|
||||
|
||||
if (lzma_stream_header_encode(&sf, out) != LZMA_OK)
|
||||
return 1;
|
||||
|
||||
if (lzma_stream_footer_encode(&sf, out + out_size) != LZMA_OK)
|
||||
return 1;
|
||||
|
||||
out_size += LZMA_STREAM_HEADER_SIZE;
|
||||
|
||||
// Write out the file.
|
||||
fwrite(out, 1, out_size, stdout);
|
||||
|
||||
return 0;
|
||||
}
|
||||
51
debug/memusage.c
Normal file
51
debug/memusage.c
Normal file
@@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file memusage.c
|
||||
/// \brief Calculates memory usage using lzma_memory_usage()
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "sysdefs.h"
|
||||
#include "lzma.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
lzma_options_lzma lzma = {
|
||||
.dict_size = (1U << 30) + (1U << 29),
|
||||
.lc = 3,
|
||||
.lp = 0,
|
||||
.pb = 2,
|
||||
.preset_dict = NULL,
|
||||
.preset_dict_size = 0,
|
||||
.mode = LZMA_MODE_NORMAL,
|
||||
.nice_len = 48,
|
||||
.mf = LZMA_MF_BT4,
|
||||
.depth = 0,
|
||||
};
|
||||
|
||||
/*
|
||||
lzma_options_filter filters[] = {
|
||||
{ LZMA_FILTER_LZMA1,
|
||||
(lzma_options_lzma *)&lzma_preset_lzma[6 - 1] },
|
||||
{ UINT64_MAX, NULL }
|
||||
};
|
||||
*/
|
||||
lzma_filter filters[] = {
|
||||
{ LZMA_FILTER_LZMA1, &lzma },
|
||||
{ UINT64_MAX, NULL }
|
||||
};
|
||||
|
||||
printf("Encoder: %10" PRIu64 " B\n",
|
||||
lzma_raw_encoder_memusage(filters));
|
||||
printf("Decoder: %10" PRIu64 " B\n",
|
||||
lzma_raw_decoder_memusage(filters));
|
||||
|
||||
return 0;
|
||||
}
|
||||
36
debug/repeat.c
Normal file
36
debug/repeat.c
Normal file
@@ -0,0 +1,36 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file repeat.c
|
||||
/// \brief Repeats given string given times
|
||||
///
|
||||
/// This program can be useful when debugging run-length encoder in
|
||||
/// the Subblock filter, especially the condition when repeat count
|
||||
/// doesn't fit into 28-bit integer.
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "sysdefs.h"
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
if (argc != 3) {
|
||||
fprintf(stderr, "Usage: %s COUNT STRING\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
unsigned long long count = strtoull(argv[1], NULL, 10);
|
||||
const size_t size = strlen(argv[2]);
|
||||
|
||||
while (count-- != 0)
|
||||
fwrite(argv[2], 1, size, stdout);
|
||||
|
||||
return !!(ferror(stdout) || fclose(stdout));
|
||||
}
|
||||
124
debug/sync_flush.c
Normal file
124
debug/sync_flush.c
Normal file
@@ -0,0 +1,124 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file sync_flush.c
|
||||
/// \brief Encode files using LZMA_SYNC_FLUSH
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "sysdefs.h"
|
||||
#include "lzma.h"
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
static lzma_stream strm = LZMA_STREAM_INIT;
|
||||
static FILE *file_in;
|
||||
|
||||
|
||||
static void
|
||||
encode(size_t size, lzma_action action)
|
||||
{
|
||||
static const size_t CHUNK = 64;
|
||||
uint8_t in[CHUNK];
|
||||
uint8_t out[CHUNK];
|
||||
lzma_ret ret;
|
||||
|
||||
do {
|
||||
if (strm.avail_in == 0 && size > 0) {
|
||||
const size_t amount = my_min(size, CHUNK);
|
||||
strm.avail_in = fread(in, 1, amount, file_in);
|
||||
strm.next_in = in;
|
||||
size -= amount; // Intentionally not using avail_in.
|
||||
}
|
||||
|
||||
strm.next_out = out;
|
||||
strm.avail_out = CHUNK;
|
||||
|
||||
ret = lzma_code(&strm, size == 0 ? action : LZMA_RUN);
|
||||
|
||||
if (ret != LZMA_OK && ret != LZMA_STREAM_END) {
|
||||
fprintf(stderr, "%s:%u: %s: ret == %d\n",
|
||||
__FILE__, __LINE__, __func__, ret);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
fwrite(out, 1, CHUNK - strm.avail_out, stdout);
|
||||
|
||||
} while (size > 0 || strm.avail_out == 0);
|
||||
|
||||
if ((action == LZMA_RUN && ret != LZMA_OK)
|
||||
|| (action != LZMA_RUN && ret != LZMA_STREAM_END)) {
|
||||
fprintf(stderr, "%s:%u: %s: ret == %d\n",
|
||||
__FILE__, __LINE__, __func__, ret);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
file_in = argc > 1 ? fopen(argv[1], "rb") : stdin;
|
||||
|
||||
// Config
|
||||
lzma_options_lzma opt_lzma = {
|
||||
.dict_size = 1U << 16,
|
||||
.lc = LZMA_LC_DEFAULT,
|
||||
.lp = LZMA_LP_DEFAULT,
|
||||
.pb = LZMA_PB_DEFAULT,
|
||||
.preset_dict = NULL,
|
||||
.mode = LZMA_MODE_NORMAL,
|
||||
.nice_len = 32,
|
||||
.mf = LZMA_MF_HC3,
|
||||
.depth = 0,
|
||||
};
|
||||
|
||||
lzma_options_delta opt_delta = {
|
||||
.dist = 16
|
||||
};
|
||||
|
||||
lzma_filter filters[LZMA_FILTERS_MAX + 1];
|
||||
filters[0].id = LZMA_FILTER_LZMA2;
|
||||
filters[0].options = &opt_lzma;
|
||||
filters[1].id = LZMA_VLI_UNKNOWN;
|
||||
|
||||
// Init
|
||||
if (lzma_stream_encoder(&strm, filters, LZMA_CHECK_CRC32) != LZMA_OK) {
|
||||
fprintf(stderr, "init failed\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Encoding
|
||||
encode(0, LZMA_SYNC_FLUSH);
|
||||
encode(6, LZMA_SYNC_FLUSH);
|
||||
encode(0, LZMA_SYNC_FLUSH);
|
||||
encode(7, LZMA_SYNC_FLUSH);
|
||||
encode(0, LZMA_SYNC_FLUSH);
|
||||
encode(0, LZMA_FINISH);
|
||||
|
||||
/*
|
||||
encode(53, LZMA_SYNC_FLUSH);
|
||||
opt_lzma.lc = 2;
|
||||
opt_lzma.lp = 1;
|
||||
opt_lzma.pb = 0;
|
||||
if (lzma_filters_update(&strm, filters) != LZMA_OK) {
|
||||
fprintf(stderr, "update failed\n");
|
||||
exit(1);
|
||||
}
|
||||
encode(404, LZMA_FINISH);
|
||||
*/
|
||||
|
||||
// Clean up
|
||||
lzma_end(&strm);
|
||||
|
||||
return 0;
|
||||
|
||||
// Prevent useless warnings so we don't need to have special CFLAGS
|
||||
// to disable -Werror.
|
||||
(void)opt_lzma;
|
||||
(void)opt_delta;
|
||||
}
|
||||
100
debug/translation.bash
Normal file
100
debug/translation.bash
Normal file
@@ -0,0 +1,100 @@
|
||||
#!/bin/bash
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Script to check output of some translated messages
|
||||
#
|
||||
# This should be useful for translators to check that the translated strings
|
||||
# look good. This doesn't make xz print all possible strings, but it should
|
||||
# cover most of the cases where mistakes can easily happen.
|
||||
#
|
||||
# Give the path and filename of the xz executable as an argument. If no
|
||||
# arguments are given, this script uses ../src/xz/xz (relative to the
|
||||
# location of this script).
|
||||
#
|
||||
# You may want to pipe the output of this script to less -S to view the
|
||||
# tables printed by xz --list on a 80-column terminal. On the other hand,
|
||||
# viewing the other messages may be better without -S.
|
||||
#
|
||||
###############################################################################
|
||||
#
|
||||
# Author: Lasse Collin
|
||||
#
|
||||
# This file has been put into the public domain.
|
||||
# You can do whatever you want with this file.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
set -e
|
||||
|
||||
# If an argument was given, use it to set the location of the xz executable.
|
||||
unset XZ
|
||||
if [ -n "$1" ]; then
|
||||
XZ=$1
|
||||
[ "x${XZ:0:1}" != "x/" ] && XZ="$PWD/$XZ"
|
||||
fi
|
||||
|
||||
# Locate top_srcdir and go there.
|
||||
top_srcdir="$(cd -- "$(dirname -- "$0")" && cd .. && pwd)"
|
||||
cd -- "$top_srcdir"
|
||||
|
||||
# If XZ wasn't already set, use the default location.
|
||||
XZ=${XZ-"$PWD/src/xz/xz"}
|
||||
if [ "$(type -t "$XZ" || true)" != "file" ]; then
|
||||
echo "Give the location of the xz executable as an argument" \
|
||||
"to this script."
|
||||
exit 1
|
||||
fi
|
||||
XZ=$(type -p -- "$XZ")
|
||||
|
||||
# Print the xz version and locale information.
|
||||
echo "$XZ --version"
|
||||
"$XZ" --version
|
||||
echo
|
||||
if [ -d .git ] && type git > /dev/null 2>&1; then
|
||||
echo "Source code version in $PWD:"
|
||||
git describe --abbrev=4
|
||||
fi
|
||||
echo
|
||||
locale
|
||||
echo
|
||||
|
||||
# Make the test files directory the current directory.
|
||||
cd tests/files
|
||||
|
||||
# Put xz in PATH so that argv[0] stays short.
|
||||
PATH=${XZ%/*}:$PATH
|
||||
|
||||
# Some of the test commands are error messages and thus don't
|
||||
# return successfully.
|
||||
set +e
|
||||
|
||||
for CMD in \
|
||||
"xz --foobarbaz" \
|
||||
"xz --memlimit=123abcd" \
|
||||
"xz --memlimit=40MiB -6 /dev/null" \
|
||||
"xz --memlimit=0 --info-memory" \
|
||||
"xz --memlimit-compress=1234MiB --memlimit-decompress=50MiB --info-memory" \
|
||||
"xz --verbose --verbose /dev/null | cat" \
|
||||
"xz --lzma2=foobarbaz" \
|
||||
"xz --lzma2=foobarbaz=abcd" \
|
||||
"xz --lzma2=mf=abcd" \
|
||||
"xz --lzma2=preset=foobarbaz" \
|
||||
"xz --lzma2=mf=bt4,nice=2" \
|
||||
"xz --lzma2=nice=50000" \
|
||||
"xz --help" \
|
||||
"xz --long-help" \
|
||||
"xz --list good-*lzma2*" \
|
||||
"xz --list good-1-check*" \
|
||||
"xz --list --verbose good-*lzma2*" \
|
||||
"xz --list --verbose good-1-check*" \
|
||||
"xz --list --verbose --verbose good-*lzma2*" \
|
||||
"xz --list --verbose --verbose good-1-check*" \
|
||||
"xz --list --verbose --verbose unsupported-check.xz"
|
||||
do
|
||||
echo "-----------------------------------------------------------"
|
||||
echo
|
||||
echo "\$ $CMD"
|
||||
eval "$CMD"
|
||||
echo
|
||||
done 2>&1
|
||||
46
doc/bugs.txt
46
doc/bugs.txt
@@ -1,46 +0,0 @@
|
||||
|
||||
Reporting bugs
|
||||
--------------
|
||||
|
||||
Naturally it is easiest for me if you already know what causes the
|
||||
unexpected behavior. Even better if you have a patch to propose.
|
||||
However, quite often the reason for unexpected behavior is unknown,
|
||||
so below are a few things what to do before sending a bug report.
|
||||
|
||||
In case of a crash (usually segmentation violation):
|
||||
|
||||
1. Try to create a small example how to reprocude the issue.
|
||||
|
||||
2. If you are writing an application using liblzma or libzfile,
|
||||
double check that you are using the libraries correctly (for
|
||||
example, that you didn't forget to call lzma_init()). If it is
|
||||
the command line tool included in LZMA Utils that is crashing,
|
||||
ignore this step.
|
||||
|
||||
3. Compile LZMA Utils with debugging code using configure switch
|
||||
`--enable-debug'. If you are using GCC as the compiler, use
|
||||
CFLAGS='-O0 -ggdb'. Don't strip the resulting binaries.
|
||||
|
||||
4. Turn on core dumps. The exact command depends on your shell;
|
||||
for example in GNU bash it is done with `ulimit -c unlimited',
|
||||
and in tcsh with `limit coredumpsize unlimited'.
|
||||
|
||||
5. Try to reproduce the suspected bug. If you get `assertion failed'
|
||||
message, be sure to include the complete message in your bug
|
||||
report. If the application leaves a coredump, get a backtrace
|
||||
using gdb:
|
||||
$ gdb /path/to/app-binary # Loads the app to the debugger.
|
||||
(gdb) core core # Opens the coredump.
|
||||
(gdb) bt # Prints the backtrace. Copy & paste to bug report.
|
||||
(gdb) quit # Quits gdb.
|
||||
|
||||
Send your bug report to Lasse Collin <lasse.collin@tukaani.org>. Don't
|
||||
send the core dump file or the actual executables. If you have a small
|
||||
example file(s) (total size less than 100 KiB), please include it/them
|
||||
as an attachment.
|
||||
|
||||
Do NOT complain about problems with LZMA Utils to Igor Pavlov.
|
||||
Although the code of LZMA Utils is derived from his code, there are
|
||||
a lot of changes, which may have introduced bugs not present in
|
||||
the original version.
|
||||
|
||||
127
doc/examples/xz_pipe_comp.c
Normal file
127
doc/examples/xz_pipe_comp.c
Normal file
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
* xz_pipe_comp.c
|
||||
* A simple example of pipe-only xz compressor implementation.
|
||||
* version: 2010-07-12 - by Daniel Mealha Cabrita
|
||||
* Not copyrighted -- provided to the public domain.
|
||||
*
|
||||
* Compiling:
|
||||
* Link with liblzma. GCC example:
|
||||
* $ gcc -llzma xz_pipe_comp.c -o xz_pipe_comp
|
||||
*
|
||||
* Usage example:
|
||||
* $ cat some_file | ./xz_pipe_comp > some_file.xz
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <lzma.h>
|
||||
|
||||
|
||||
/* COMPRESSION SETTINGS */
|
||||
|
||||
/* analogous to xz CLI options: -0 to -9 */
|
||||
#define COMPRESSION_LEVEL 6
|
||||
|
||||
/* boolean setting, analogous to xz CLI option: -e */
|
||||
#define COMPRESSION_EXTREME true
|
||||
|
||||
/* see: /usr/include/lzma/check.h LZMA_CHECK_* */
|
||||
#define INTEGRITY_CHECK LZMA_CHECK_CRC64
|
||||
|
||||
|
||||
/* read/write buffer sizes */
|
||||
#define IN_BUF_MAX 4096
|
||||
#define OUT_BUF_MAX 4096
|
||||
|
||||
/* error codes */
|
||||
#define RET_OK 0
|
||||
#define RET_ERROR_INIT 1
|
||||
#define RET_ERROR_INPUT 2
|
||||
#define RET_ERROR_OUTPUT 3
|
||||
#define RET_ERROR_COMPRESSION 4
|
||||
|
||||
|
||||
/* note: in_file and out_file must be open already */
|
||||
int xz_compress (FILE *in_file, FILE *out_file)
|
||||
{
|
||||
uint32_t preset = COMPRESSION_LEVEL | (COMPRESSION_EXTREME ? LZMA_PRESET_EXTREME : 0);
|
||||
lzma_check check = INTEGRITY_CHECK;
|
||||
lzma_stream strm = LZMA_STREAM_INIT; /* alloc and init lzma_stream struct */
|
||||
uint8_t in_buf [IN_BUF_MAX];
|
||||
uint8_t out_buf [OUT_BUF_MAX];
|
||||
size_t in_len; /* length of useful data in in_buf */
|
||||
size_t out_len; /* length of useful data in out_buf */
|
||||
bool in_finished = false;
|
||||
bool out_finished = false;
|
||||
lzma_action action;
|
||||
lzma_ret ret_xz;
|
||||
int ret;
|
||||
|
||||
ret = RET_OK;
|
||||
|
||||
/* initialize xz encoder */
|
||||
ret_xz = lzma_easy_encoder (&strm, preset, check);
|
||||
if (ret_xz != LZMA_OK) {
|
||||
fprintf (stderr, "lzma_easy_encoder error: %d\n", (int) ret_xz);
|
||||
return RET_ERROR_INIT;
|
||||
}
|
||||
|
||||
while ((! in_finished) && (! out_finished)) {
|
||||
/* read incoming data */
|
||||
in_len = fread (in_buf, 1, IN_BUF_MAX, in_file);
|
||||
|
||||
if (feof (in_file)) {
|
||||
in_finished = true;
|
||||
}
|
||||
if (ferror (in_file)) {
|
||||
in_finished = true;
|
||||
ret = RET_ERROR_INPUT;
|
||||
}
|
||||
|
||||
strm.next_in = in_buf;
|
||||
strm.avail_in = in_len;
|
||||
|
||||
/* if no more data from in_buf, flushes the
|
||||
internal xz buffers and closes the xz data
|
||||
with LZMA_FINISH */
|
||||
action = in_finished ? LZMA_FINISH : LZMA_RUN;
|
||||
|
||||
/* loop until there's no pending compressed output */
|
||||
do {
|
||||
/* out_buf is clean at this point */
|
||||
strm.next_out = out_buf;
|
||||
strm.avail_out = OUT_BUF_MAX;
|
||||
|
||||
/* compress data */
|
||||
ret_xz = lzma_code (&strm, action);
|
||||
|
||||
if ((ret_xz != LZMA_OK) && (ret_xz != LZMA_STREAM_END)) {
|
||||
fprintf (stderr, "lzma_code error: %d\n", (int) ret_xz);
|
||||
out_finished = true;
|
||||
ret = RET_ERROR_COMPRESSION;
|
||||
} else {
|
||||
/* write compressed data */
|
||||
out_len = OUT_BUF_MAX - strm.avail_out;
|
||||
fwrite (out_buf, 1, out_len, out_file);
|
||||
if (ferror (out_file)) {
|
||||
out_finished = true;
|
||||
ret = RET_ERROR_OUTPUT;
|
||||
}
|
||||
}
|
||||
} while (strm.avail_out == 0);
|
||||
}
|
||||
|
||||
lzma_end (&strm);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = xz_compress (stdin, stdout);
|
||||
return ret;
|
||||
}
|
||||
|
||||
115
doc/examples/xz_pipe_decomp.c
Normal file
115
doc/examples/xz_pipe_decomp.c
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* xz_pipe_decomp.c
|
||||
* A simple example of pipe-only xz decompressor implementation.
|
||||
* version: 2010-07-12 - by Daniel Mealha Cabrita
|
||||
* Not copyrighted -- provided to the public domain.
|
||||
*
|
||||
* Compiling:
|
||||
* Link with liblzma. GCC example:
|
||||
* $ gcc -llzma xz_pipe_decomp.c -o xz_pipe_decomp
|
||||
*
|
||||
* Usage example:
|
||||
* $ cat some_file.xz | ./xz_pipe_decomp > some_file
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <lzma.h>
|
||||
|
||||
|
||||
/* read/write buffer sizes */
|
||||
#define IN_BUF_MAX 4096
|
||||
#define OUT_BUF_MAX 4096
|
||||
|
||||
/* error codes */
|
||||
#define RET_OK 0
|
||||
#define RET_ERROR_INIT 1
|
||||
#define RET_ERROR_INPUT 2
|
||||
#define RET_ERROR_OUTPUT 3
|
||||
#define RET_ERROR_DECOMPRESSION 4
|
||||
|
||||
|
||||
/* note: in_file and out_file must be open already */
|
||||
int xz_decompress (FILE *in_file, FILE *out_file)
|
||||
{
|
||||
lzma_stream strm = LZMA_STREAM_INIT; /* alloc and init lzma_stream struct */
|
||||
const uint32_t flags = LZMA_TELL_UNSUPPORTED_CHECK | LZMA_CONCATENATED;
|
||||
const uint64_t memory_limit = UINT64_MAX; /* no memory limit */
|
||||
uint8_t in_buf [IN_BUF_MAX];
|
||||
uint8_t out_buf [OUT_BUF_MAX];
|
||||
size_t in_len; /* length of useful data in in_buf */
|
||||
size_t out_len; /* length of useful data in out_buf */
|
||||
bool in_finished = false;
|
||||
bool out_finished = false;
|
||||
lzma_action action;
|
||||
lzma_ret ret_xz;
|
||||
int ret;
|
||||
|
||||
ret = RET_OK;
|
||||
|
||||
/* initialize xz decoder */
|
||||
ret_xz = lzma_stream_decoder (&strm, memory_limit, flags);
|
||||
if (ret_xz != LZMA_OK) {
|
||||
fprintf (stderr, "lzma_stream_decoder error: %d\n", (int) ret_xz);
|
||||
return RET_ERROR_INIT;
|
||||
}
|
||||
|
||||
while ((! in_finished) && (! out_finished)) {
|
||||
/* read incoming data */
|
||||
in_len = fread (in_buf, 1, IN_BUF_MAX, in_file);
|
||||
|
||||
if (feof (in_file)) {
|
||||
in_finished = true;
|
||||
}
|
||||
if (ferror (in_file)) {
|
||||
in_finished = true;
|
||||
ret = RET_ERROR_INPUT;
|
||||
}
|
||||
|
||||
strm.next_in = in_buf;
|
||||
strm.avail_in = in_len;
|
||||
|
||||
/* if no more data from in_buf, flushes the
|
||||
internal xz buffers and closes the decompressed data
|
||||
with LZMA_FINISH */
|
||||
action = in_finished ? LZMA_FINISH : LZMA_RUN;
|
||||
|
||||
/* loop until there's no pending decompressed output */
|
||||
do {
|
||||
/* out_buf is clean at this point */
|
||||
strm.next_out = out_buf;
|
||||
strm.avail_out = OUT_BUF_MAX;
|
||||
|
||||
/* decompress data */
|
||||
ret_xz = lzma_code (&strm, action);
|
||||
|
||||
if ((ret_xz != LZMA_OK) && (ret_xz != LZMA_STREAM_END)) {
|
||||
fprintf (stderr, "lzma_code error: %d\n", (int) ret_xz);
|
||||
out_finished = true;
|
||||
ret = RET_ERROR_DECOMPRESSION;
|
||||
} else {
|
||||
/* write decompressed data */
|
||||
out_len = OUT_BUF_MAX - strm.avail_out;
|
||||
fwrite (out_buf, 1, out_len, out_file);
|
||||
if (ferror (out_file)) {
|
||||
out_finished = true;
|
||||
ret = RET_ERROR_OUTPUT;
|
||||
}
|
||||
}
|
||||
} while (strm.avail_out == 0);
|
||||
}
|
||||
|
||||
lzma_end (&strm);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = xz_decompress (stdin, stdout);
|
||||
return ret;
|
||||
}
|
||||
|
||||
353
doc/faq.txt
353
doc/faq.txt
@@ -1,247 +1,224 @@
|
||||
|
||||
LZMA Utils FAQ
|
||||
--------------
|
||||
XZ Utils FAQ
|
||||
============
|
||||
|
||||
Copyright (C) 2007 Lasse Collin
|
||||
Q: What do the letters XZ mean?
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved.
|
||||
A: Nothing. They are just two letters, which come from the file format
|
||||
suffix .xz. The .xz suffix was selected, because it seemed to be
|
||||
pretty much unused. It has no deeper meaning.
|
||||
|
||||
|
||||
Q: What are LZMA, LZMA Utils, lzma, .lzma, liblzma, LZMA SDK, LZMA_Alone,
|
||||
7-Zip and p7zip?
|
||||
Q: What are LZMA and LZMA2?
|
||||
|
||||
A: LZMA stands for Lempel-Ziv-Markov chain-Algorithm. LZMA is the name
|
||||
of the compression algorithm designed by Igor Pavlov. He is the author
|
||||
of 7-Zip, which is a great LGPL'd compression tool for Microsoft
|
||||
Windows operating systems. In addition to 7-Zip itself, also LZMA SDK
|
||||
is available on the website of 7-Zip. LZMA SDK contains LZMA
|
||||
implementations in C++, Java and C#. The C++ version is the original
|
||||
implementation which is used also in 7-Zip itself.
|
||||
A: LZMA stands for Lempel-Ziv-Markov chain-Algorithm. It is the name
|
||||
of the compression algorithm designed by Igor Pavlov for 7-Zip.
|
||||
LZMA is based on LZ77 and range encoding.
|
||||
|
||||
Excluding the unrar plugin, 7-Zip is free software (free as in
|
||||
freedom). Thanks to this, it was possible to port it to POSIX
|
||||
platforms. The port was done and is maintained by myspace (TODO:
|
||||
myspace's real name?). p7zip is a port of 7-Zip's command line version;
|
||||
p7zip doesn't include the 7-Zip's GUI.
|
||||
|
||||
In POSIX world, users are used to gzip and bzip2 command line tools.
|
||||
Developers know APIs of zlib and libbzip2. LZMA Utils try to ease
|
||||
adoption of LZMA on free operating systems by providing a compression
|
||||
library and a set of command line tools. The library is called liblzma.
|
||||
It provides a zlib-like API making it easy to adapt LZMA compression in
|
||||
existing applications. The main command line tool is known as lzma,
|
||||
whose command line syntax is very similar to that of gzip and bzip2.
|
||||
|
||||
The original command line tool from LZMA SDK (lzma.exe) was found from
|
||||
a directory called LZMA_Alone in the LZMA SDK. It used a simple header
|
||||
format in .lzma files. This format was also used by LZMA Utils up to
|
||||
and including 4.32.x. In LZMA Utils documentation, LZMA_Alone refers
|
||||
to both the file format and the command line tool from LZMA SDK.
|
||||
|
||||
Because of various limitations of the LZMA_Alone file format, a new
|
||||
file format was developed. Extending some existing format such as .gz
|
||||
used by gzip was considered, but these formats were found to be too
|
||||
limited. The filename suffix for the new .lzma format is `.lzma'. The
|
||||
same suffix is also used for files in the LZMA_Alone format. To make
|
||||
the transition to the new format as transparent as possible, LZMA Utils
|
||||
support both the new and old formats transparently.
|
||||
|
||||
7-Zip and LZMA SDK: <http://7-zip.org/>
|
||||
p7zip: <http://p7zip.sourceforge.net/>
|
||||
LZMA Utils: <http://tukaani.org/lzma/>
|
||||
LZMA2 is an updated version of the original LZMA to fix a couple of
|
||||
practical issues. In context of XZ Utils, LZMA is called LZMA1 to
|
||||
emphasize that LZMA is not the same thing as LZMA2. LZMA2 is the
|
||||
primary compression algorithm in the .xz file format.
|
||||
|
||||
|
||||
Q: What LZMA implementations there are available?
|
||||
Q: There are many LZMA related projects. How does XZ Utils relate to them?
|
||||
|
||||
A: LZMA SDK contains implementations in C++, Java and C#. The C++ version
|
||||
is the original implementation which is part of 7-Zip. LZMA SDK
|
||||
contains also a small LZMA decoder in C.
|
||||
A: 7-Zip and LZMA SDK are the original projects. LZMA SDK is roughly
|
||||
a subset of the 7-Zip source tree.
|
||||
|
||||
A port of LZMA SDK to Pascal was made by Alan Birtles
|
||||
<http://www.birtles.org.uk/programming/>. It should work with
|
||||
multiple Pascal programming language implementations.
|
||||
p7zip is 7-Zip's command line tools ported to POSIX-like systems.
|
||||
|
||||
LZMA Utils includes liblzma, which is directly based on LZMA SDK.
|
||||
liblzma is written in C (C99, not C89). In contrast to C++ callback
|
||||
API used by LZMA SDK, liblzma uses zlib-like stateful C API. I do not
|
||||
want to comment whether both/former/latter/neither API(s) are good or
|
||||
bad. The only reason to implement a zlib-like API was, that many
|
||||
developers are already familiar with zlib, and very many applications
|
||||
already use zlib. Having a similar API makes it easier to include LZMA
|
||||
support in existing applications.
|
||||
LZMA Utils provide a gzip-like lzma tool for POSIX-like systems.
|
||||
LZMA Utils are based on LZMA SDK. XZ Utils are the successor to
|
||||
LZMA Utils.
|
||||
|
||||
See also <http://en.wikipedia.org/wiki/LZMA#External_links>.
|
||||
There are several other projects using LZMA. Most are more or less
|
||||
based on LZMA SDK. See <http://7-zip.org/links.html>.
|
||||
|
||||
|
||||
Q: Which file formats are supported by LZMA Utils?
|
||||
Q: Why is liblzma named liblzma if its primary file format is .xz?
|
||||
Shouldn't it be e.g. libxz?
|
||||
|
||||
A: Even when the raw LZMA stream is always the same, it can be wrapped
|
||||
in different container formats. The preferred format is the new .lzma
|
||||
format. It has magic bytes (the first six bytes: 0xFF 'L' 'Z' 'M'
|
||||
'A' 0x00). The format supports chaining up to seven filters filters,
|
||||
splitting data to multiple blocks for easier multi-threading and rough
|
||||
random-access reading. The file integrity is verified using CRC32,
|
||||
CRC64, or SHA256, and by verifying the uncompressed size of the file.
|
||||
|
||||
LZMA SDK includes a tool called LZMA_Alone. It supports uses a
|
||||
primitive header which includes only the mandatory stream information
|
||||
required by the LZMA decoder. This format can be both read and
|
||||
written by liblzma and the command line tool (use --format=alone to
|
||||
create such files).
|
||||
|
||||
.7z is the native archive format used by 7-Zip. This format is not
|
||||
supported by liblzma, and probably will never be supported. You
|
||||
should use e.g. p7zip to extract .7z files.
|
||||
|
||||
It is possible to implement custom file formats by using raw filter
|
||||
mode in liblzma. In this mode the application needs to store the filter
|
||||
properties and provide them to liblzma before starting to uncompress
|
||||
the data.
|
||||
A: When the designing of the .xz format began, the idea was to replace
|
||||
the .lzma format and use the same .lzma suffix. It would have been
|
||||
quite OK to reuse the suffix when there were very few .lzma files
|
||||
around. However, the old .lzma format become popular before the
|
||||
new format was finished. The new format was renamed to .xz but the
|
||||
name of liblzma wasn't changed.
|
||||
|
||||
|
||||
Q: How can I identify files containing LZMA compressed data?
|
||||
Q: Do XZ Utils support the .7z format?
|
||||
|
||||
A: The preferred filename suffix for .lzma files is `.lzma'. `.tar.lzma'
|
||||
may be abbreviated to `.tlz'. The same suffixes are used for files in
|
||||
LZMA_Alone format. In practice this should be no problem since tools
|
||||
included in LZMA Utils support both formats transparently.
|
||||
|
||||
Checking the magic bytes is easy way to detect files in the new .lzma
|
||||
format (the first six bytes: 0xFF 'L' 'Z' 'M' 'A' 0x00). The "file"
|
||||
command version FIXME contains magic strings for this format.
|
||||
|
||||
The old LZMA_Alone format has no magic bytes. Its header cannot contain
|
||||
arbitrary bytes, thus it is possible to make a guess. Unfortunately the
|
||||
guessing is usually too hard to be reliable, so don't try it unless you
|
||||
are desperate.
|
||||
A: No. Use 7-Zip (Windows) or p7zip (POSIX-like systems) to handle .7z
|
||||
files.
|
||||
|
||||
|
||||
Q: Does the lzma command line tool support sparse files?
|
||||
Q: I have many .tar.7z files. Can I convert them to .tar.xz without
|
||||
spending hours recompressing the data?
|
||||
|
||||
A: Sparse files can (of course) be compressed like normal files, but
|
||||
uncompression will not restore sparseness of the file. Use an archiver
|
||||
tool to take care of sparseness before compressing the data with lzma.
|
||||
|
||||
The reason for this is that archiver tools handle files, while
|
||||
compression tools handle streams or buffers. Being a sparse file is
|
||||
a property of the file on the disk, not a property of the stream or
|
||||
buffer.
|
||||
A: In the "extra" directory, there is a script named 7z2lzma.bash which
|
||||
is able to convert some .7z files to the .lzma format (not .xz). It
|
||||
needs the 7za (or 7z) command from p7zip. The script may silently
|
||||
produce corrupt output if certain assumptions are not met, so
|
||||
decompress the resulting .lzma file and compare it against the
|
||||
original before deleting the original file!
|
||||
|
||||
|
||||
Q: Can I recover parts of a broken LZMA file (e.g. corrupted CD-R)?
|
||||
Q: I have many .lzma files. Can I quickly convert them to the .xz format?
|
||||
|
||||
A: With LZMA_Alone and single-block .lzma files, you can uncompress the
|
||||
file until you hit the first broken byte. The data after the broken
|
||||
position is lost. LZMA relies on the uncompression history, and if
|
||||
bytes are missing in the middle of the file, it is impossible to
|
||||
reliably continue after the broken section.
|
||||
A: For now, no. Since XZ Utils supports the .lzma format, it's usually
|
||||
not too bad to keep the old files in the old format. If you want to
|
||||
do the conversion anyway, you need to decompress the .lzma files and
|
||||
then recompress to the .xz format.
|
||||
|
||||
With multi-block .lzma files it may be possible to locale the next
|
||||
block in the file and continue decoding there. A limited recovery
|
||||
tool for this kind of situations is planned.
|
||||
Technically, there is a way to make the conversion relatively fast
|
||||
(roughly twice the time that normal decompression takes). Writing
|
||||
such a tool would take quite a bit time though, and would probably
|
||||
be useful to only a few people. If you really want such a conversion
|
||||
tool, contact Lasse Collin and offer some money.
|
||||
|
||||
|
||||
Q: Is LZMA patented?
|
||||
Q: I have installed xz, but my tar doesn't recognize .tar.xz files.
|
||||
How can I extract .tar.xz files?
|
||||
|
||||
A: No, the authors are not aware of any patents that could affect LZMA.
|
||||
However, due to nature of software patents, the authors cannot
|
||||
guarantee, that LZMA isn't affected by any third party patent.
|
||||
A: xz -dc foo.tar.xz | tar xf -
|
||||
|
||||
|
||||
Q: Where can I find documentation about how LZMA works as an algorithm?
|
||||
Q: Can I recover parts of a broken .xz file (e.g. corrupted CD-R)?
|
||||
|
||||
A: Read the source code, Luke. There is no documentation about LZMA
|
||||
internals. It is possible that Igor Pavlov is the only person on
|
||||
the Earth that completely knows and understands the algorithm.
|
||||
|
||||
You could begin by downloading LZMA SDK, and start reading from
|
||||
the LZMA decoder to get some idea about the bitstream format.
|
||||
Before you begin, you should know the basics of LZ77 and
|
||||
range coding algorithms. LZMA is based on LZ77, but LZMA is
|
||||
*a lot* more complex. Range coding is used to compress the
|
||||
final bitstream like Huffman coding is used in Deflate.
|
||||
A: It may be possible if the file consists of multiple blocks, which
|
||||
typically is not the case if the file was created in single-threaded
|
||||
mode. There is no recovery program yet.
|
||||
|
||||
|
||||
Q: What are filters?
|
||||
Q: Is (some part of) XZ Utils patented?
|
||||
|
||||
A: In context of .lzma files, a filter means an implementation of a
|
||||
compression algorithm. The primary filter is LZMA, which is why
|
||||
the names of the tools contain the letters LZMA.
|
||||
A: Lasse Collin is not aware of any patents that could affect XZ Utils.
|
||||
However, due to nature of software patents, it's not possible to
|
||||
guarantee that XZ Utils isn't affected by any third party patent(s).
|
||||
|
||||
liblzma and the new .lzma format support also other filters than LZMA.
|
||||
There are different types of filters, which are suitable for different
|
||||
types of data. Thus, to select the optimal filter and settings, the
|
||||
type of the input data being compressed needs to be known.
|
||||
|
||||
Some filters are most useful when combined with another filter like
|
||||
LZMA. These filters increase redundancy in the data, without changing
|
||||
the size of the data, by taking advantage of properties specific to
|
||||
the data being compressed.
|
||||
Q: Where can I find documentation about the file format and algorithms?
|
||||
|
||||
So far, all the filters are always reversible. That is, no matter what
|
||||
data you pass to a filter encoder, it can be always defiltered back to
|
||||
the original form. Because of this, it is safe to compress for example
|
||||
a software package that contains other file types than executables
|
||||
using a filter specific to the architechture of the package being
|
||||
compressed.
|
||||
A: The .xz format is documented in xz-file-format.txt. It is a container
|
||||
format only, and doesn't include descriptions of any non-trivial
|
||||
filters.
|
||||
|
||||
The old LZMA_Alone format supports only the LZMA filter.
|
||||
Documenting LZMA and LZMA2 is planned, but for now, there is no other
|
||||
documentation that the source code. Before you begin, you should know
|
||||
the basics of LZ77 and range coding algorithms. LZMA is based on LZ77,
|
||||
but LZMA is a lot more complex. Range coding is used to compress
|
||||
the final bitstream like Huffman coding is used in Deflate.
|
||||
|
||||
|
||||
Q: I cannot find BCJ and BCJ2 filters. Don't they exist in liblzma?
|
||||
|
||||
A: BCJ filter is called "x86" in liblzma. BCJ2 is not included,
|
||||
because it requires using more than one encoded output stream.
|
||||
A streamable version of BCJ2-style filtering is planned.
|
||||
|
||||
|
||||
Q: Can I use LZMA in proprietary, non-free applications?
|
||||
Q: I need to use a script that runs "xz -9". On a system with 256 MiB
|
||||
of RAM, xz says that it cannot allocate memory. Can I make the
|
||||
script work without modifying it?
|
||||
|
||||
A: liblzma is under the GNU LGPL version 2.1 or (at your opinion) any
|
||||
later version. To summarise (*NOTE* This summary is not legally
|
||||
binding, that is, it doesn't give you any extra permissions compared
|
||||
to the LGPL. Read the GNU LGPL carefully for the exact license
|
||||
conditions.):
|
||||
* All the changes made into the library itself must be published
|
||||
under the same license.
|
||||
* End users must be able to replace the used liblzma. Easiest way
|
||||
to assure this is to link dynamically against liblzma so users
|
||||
can replace the shared library file if they want.
|
||||
* You must make it clear to your users, that your application uses
|
||||
liblzma, and that liblzma is free software under the GNU LGPL.
|
||||
A copy of GNU LGPL must be included.
|
||||
A: Set a default memory usage limit for compression. You can do it e.g.
|
||||
in a shell initialization script such as ~/.bashrc or /etc/profile:
|
||||
|
||||
LZMA SDK contains a special exception which allows linking *unmodified*
|
||||
code statically with a non-free application. This exception does *not*
|
||||
apply to liblzma.
|
||||
XZ_DEFAULTS=--memlimit-compress=150MiB
|
||||
export XZ_DEFAULTS
|
||||
|
||||
As an alternative, you can support the development of LZMA and 7-Zip
|
||||
by buying a proprietary license from Igor Pavlov. See homepage of
|
||||
LZMA SDK <http://7-zip.org/sdk.html> for more information. Note that
|
||||
having a proprietary license from Igor Pavlov doesn't allow you to use
|
||||
liblzma in a way that contradicts with the GNU LGPL, because liblzma
|
||||
contains code that is not copyrighted by Igor Pavlov. Please contact
|
||||
both Lasse Collin and Igor Pavlov if the license conditions of liblzma
|
||||
are not suitable for you.
|
||||
xz will then scale the compression settings down so that the given
|
||||
memory usage limit is not reached. This way xz shouldn't run out
|
||||
of memory.
|
||||
|
||||
Check also that memory-related resource limits are high enough.
|
||||
On most systems, "ulimit -a" will show the current resource limits.
|
||||
|
||||
|
||||
Q: I would like to help. What can I do?
|
||||
Q: How do I create files that can be decompressed with XZ Embedded?
|
||||
|
||||
A: See the TODO file. Please contact Lasse Collin before starting to do
|
||||
anything, because it is possible that someone else is already working
|
||||
on the same thing.
|
||||
A: See the documentation in XZ Embedded. In short, something like
|
||||
this is a good start:
|
||||
|
||||
xz --check=crc32 --lzma2=preset=6e,dict=64KiB
|
||||
|
||||
Or if a BCJ filter is needed too, e.g. if compressing
|
||||
a kernel image for PowerPC:
|
||||
|
||||
xz --check=crc32 --powerpc --lzma2=preset=6e,dict=64KiB
|
||||
|
||||
Adjust dictionary size to get a good compromise between
|
||||
compression ratio and decompressor memory usage. Note that
|
||||
in single-call decompression mode of XZ Embedded, a big
|
||||
dictionary doesn't increase memory usage.
|
||||
|
||||
|
||||
Q: How can I contact the authors?
|
||||
Q: Will xz support threaded compression?
|
||||
|
||||
A: Lasse Collin is the maintainer of LZMA Utils. You can contact him
|
||||
either via IRC (Larhzu on #tukaani at Freenode or IRCnet). Email
|
||||
should work too, <lasse.collin@tukaani.org>.
|
||||
A: It is planned and has been taken into account when designing
|
||||
the .xz file format. Eventually there will probably be three types
|
||||
of threading, each method having its own advantages and disadvantages.
|
||||
|
||||
Igor Pavlov is the father of LZMA. He is the author of 7-Zip
|
||||
and LZMA SDK. <http://7-zip.org/>
|
||||
The simplest method is splitting the uncompressed data into blocks
|
||||
and compressing them in parallel independent from each other.
|
||||
Since the blocks are compressed independently, they can also be
|
||||
decompressed independently. Together with the index feature in .xz,
|
||||
this allows using threads to create .xz files for random-access
|
||||
reading. This also makes threaded decompression possible, although
|
||||
it is not clear if threaded decompression will ever be implemented.
|
||||
|
||||
NOTE: Please don't bother Igor Pavlov with questions specific
|
||||
to LZMA Utils.
|
||||
The independent blocks method has a couple of disadvantages too. It
|
||||
will compress worse than a single-block method. Often the difference
|
||||
is not too big (maybe 1-2 %) but sometimes it can be too big. Also,
|
||||
the memory usage of the compressor increases linearly when adding
|
||||
threads.
|
||||
|
||||
Match finder parallelization is another threading method. It has
|
||||
been in 7-Zip for ages. It doesn't affect compression ratio or
|
||||
memory usage significantly. Among the three threading methods, only
|
||||
this is useful when compressing small files (files that are not
|
||||
significantly bigger than the dictionary). Unfortunately this method
|
||||
scales only to about two CPU cores.
|
||||
|
||||
The third method is pigz-style threading (I use that name, because
|
||||
pigz <http://www.zlib.net/pigz/> uses that method). It doesn't
|
||||
affect compression ratio significantly and scales to many cores.
|
||||
The memory usage scales linearly when threads are added. It isn't
|
||||
significant with pigz, because Deflate uses only 32 KiB dictionary,
|
||||
but with LZMA2 the memory usage will increase dramatically just like
|
||||
with the independent blocks method. There is also a constant
|
||||
computational overhead, which may make pigz-method a bit dull on
|
||||
dual-core compared to the parallel match finder method, but with more
|
||||
cores the overhead is not a big deal anymore.
|
||||
|
||||
Combining the threading methods will be possible and also useful.
|
||||
E.g. combining match finder parallelization with pigz-style threading
|
||||
can cut the memory usage by 50 %.
|
||||
|
||||
It is possible that the single-threaded method will be modified to
|
||||
create files indentical to the pigz-style method. We'll see once
|
||||
pigz-style threading has been implemented in liblzma.
|
||||
|
||||
|
||||
Q: How do I build a program that needs liblzmadec (lzmadec.h)?
|
||||
|
||||
A: liblzmadec is part of LZMA Utils. XZ Utils has liblzma, but no
|
||||
liblzmadec. The code using liblzmadec should be ported to use
|
||||
liblzma instead. If you cannot or don't want to do that, download
|
||||
LZMA Utils from <http://tukaani.org/lzma/>.
|
||||
|
||||
|
||||
Q: The default build of liblzma is too big. How can I make it smaller?
|
||||
|
||||
A: Give --enable-small to the configure script. Use also appropriate
|
||||
--enable or --disable options to include only those filter encoders
|
||||
and decoders and integrity checks that you actually need. Use
|
||||
CFLAGS=-Os (with GCC) or equivalent to tell your compiler to optimize
|
||||
for size. See INSTALL for information about configure options.
|
||||
|
||||
If the result is still too big, take a look at XZ Embedded. It is
|
||||
a separate project, which provides a limited but significantly
|
||||
smaller XZ decoder implementation than XZ Utils. You can find it
|
||||
at <http://tukaani.org/xz/embedded.html>.
|
||||
|
||||
|
||||
1861
doc/file-format.txt
1861
doc/file-format.txt
File diff suppressed because it is too large
Load Diff
105
doc/history.txt
105
doc/history.txt
@@ -1,6 +1,6 @@
|
||||
|
||||
LZMA Utils history
|
||||
------------------
|
||||
History of LZMA Utils and XZ Utils
|
||||
==================================
|
||||
|
||||
Tukaani distribution
|
||||
|
||||
@@ -15,10 +15,10 @@ Tukaani distribution
|
||||
which is an abbreviation of .tar.gz. A logical naming for LZMA
|
||||
compressed packages was .tlz, being an abbreviation of .tar.lzma.
|
||||
|
||||
At the end of the year 2007, there's no distribution under the Tukaani
|
||||
project anymore. Development of LZMA Utils still continues. Still,
|
||||
there are .tlz packages around, because at least Vector Linux (a
|
||||
Slackware based distribution) uses LZMA for its packages.
|
||||
At the end of the year 2007, there was no distribution under the
|
||||
Tukaani project anymore, but development of LZMA Utils was kept going.
|
||||
Still, there were .tlz packages around, because at least Vector Linux
|
||||
(a Slackware based distribution) used LZMA for its packages.
|
||||
|
||||
First versions of the modified pkgtools used the LZMA_Alone tool from
|
||||
Igor Pavlov's LZMA SDK as is. It was fine, because users wouldn't need
|
||||
@@ -59,8 +59,8 @@ Second generation
|
||||
command line tool, but they had completely different command line
|
||||
interface. The file format was still the same.
|
||||
|
||||
Lasse wrote liblzmadec, which was a small decoder-only library based on
|
||||
the C code found from LZMA SDK. liblzmadec had API similar to zlib,
|
||||
Lasse wrote liblzmadec, which was a small decoder-only library based
|
||||
on the C code found from LZMA SDK. liblzmadec had API similar to zlib,
|
||||
although there were some significant differences, which made it
|
||||
non-trivial to use it in some applications designed for zlib and
|
||||
libbzip2.
|
||||
@@ -77,8 +77,8 @@ Second generation
|
||||
but appeared to work well enough, so some people started using it too.
|
||||
|
||||
Because the development of the third generation of LZMA Utils was
|
||||
delayed considerably (roughly two years), the 4.32.x branch had to be
|
||||
kept maintained. It got some bug fixes now and then, and finally it was
|
||||
delayed considerably (3-4 years), the 4.32.x branch had to be kept
|
||||
maintained. It got some bug fixes now and then, and finally it was
|
||||
decided to call it stable, although most of the missing features were
|
||||
never added.
|
||||
|
||||
@@ -90,51 +90,60 @@ File format problems
|
||||
features. The two biggest problems for non-embedded use were lack of
|
||||
magic bytes and integrity check.
|
||||
|
||||
Igor and Lasse started developing a new file format with some help from
|
||||
Ville Koskinen, Mark Adler and Mikko Pouru. Designing the new format
|
||||
took quite a long time. It was mostly because Lasse was quite slow at
|
||||
getting things done due to personal reasons.
|
||||
Igor and Lasse started developing a new file format with some help
|
||||
from Ville Koskinen. Also Mark Adler, Mikko Pouru, H. Peter Anvin,
|
||||
and Lars Wirzenius helped with some minor things at some point of the
|
||||
development. Designing the new format took quite a long time (actually,
|
||||
too long time would be more appropriate expression). It was mostly
|
||||
because Lasse was quite slow at getting things done due to personal
|
||||
reasons.
|
||||
|
||||
Near the end of the year 2007 the new format was practically finished.
|
||||
Compared to LZMA_Alone format and the .gz format used by gzip, the new
|
||||
.lzma format is quite complex as a whole. This means that tools having
|
||||
*full* support for the new format would be larger and more complex than
|
||||
the tools supporting only the old LZMA_Alone format.
|
||||
Originally the new format was supposed to use the same .lzma suffix
|
||||
that was already used by the old file format. Switching to the new
|
||||
format wouldn't have caused much trouble when the old format wasn't
|
||||
used by many people. But since the development of the new format took
|
||||
so long time, the old format got quite popular, and it was decided
|
||||
that the new file format must use a different suffix.
|
||||
|
||||
For the situations where the full support for the .lzma format wouldn't
|
||||
be required (embedded systems, operating system kernels), the new
|
||||
format has a well-defined subset, which is easy to support with small
|
||||
amount of code. It wouldn't be as small as an implementation using the
|
||||
LZMA_Alone format, but the difference shouldn't be significant.
|
||||
It was decided to use .xz as the suffix of the new file format. The
|
||||
first stable .xz file format specification was finally released in
|
||||
December 2008. In addition to fixing the most obvious problems of
|
||||
the old .lzma format, the .xz format added some new features like
|
||||
support for multiple filters (compression algorithms), filter chaining
|
||||
(like piping on the command line), and limited random-access reading.
|
||||
|
||||
The new .lzma format allows dividing the data in multiple independent
|
||||
blocks, which can be compressed and uncompressed independenly. This
|
||||
makes multi-threading possible with algorithms that aren't inherently
|
||||
parallel (such as LZMA). There's also a central index of the sizes of
|
||||
the blocks, which makes it possible to do limited random-access reading
|
||||
with granularity of the block size.
|
||||
|
||||
The new .lzma format uses the same filename suffix that was used for
|
||||
LZMA_Alone files. The advantage is that users using the new tools won't
|
||||
notice the change to the new format. The disadvantage is that the old
|
||||
tools won't work with the new files.
|
||||
Currently the primary compression algorithm used in .xz is LZMA2.
|
||||
It is an extension on top of the original LZMA to fix some practical
|
||||
problems: LZMA2 adds support for flushing the encoder, uncompressed
|
||||
chunks, eases stateful decoder implementations, and improves support
|
||||
for multithreading. Since LZMA2 is better than the original LZMA, the
|
||||
original LZMA is not supported in .xz.
|
||||
|
||||
|
||||
Third generation
|
||||
Transition to XZ Utils
|
||||
|
||||
LZMA Utils 4.42.0alphas drop the rest of the C++ LZMA SDK. The LZMA and
|
||||
other included filters (algorithm implementations) are still directly
|
||||
based on LZMA SDK, but ported to C.
|
||||
The early versions of XZ Utils were called LZMA Utils. The first
|
||||
releases were 4.42.0alphas. They dropped the rest of the C++ LZMA SDK.
|
||||
The code was still directly based on LZMA SDK but ported to C and
|
||||
converted from callback API to stateful API. Later, Igor Pavlov made
|
||||
C version of the LZMA encoder too; these ports from C++ to C were
|
||||
independent in LZMA SDK and LZMA Utils.
|
||||
|
||||
liblzma is now the core of LZMA Utils. It has zlib-like API, which
|
||||
doesn't suffer from the problems of the API of liblzmadec. liblzma
|
||||
supports not only LZMA, but several other filters, which together
|
||||
can improve compression ratio even further with certain file types.
|
||||
The core of the new LZMA Utils was liblzma, a compression library with
|
||||
zlib-like API. liblzma supported both the old and new file format. The
|
||||
gzip-like lzma command line tool was rewritten to use liblzma.
|
||||
|
||||
The lzma and lzmadec command line tools have been rewritten. They uses
|
||||
liblzma to do the actual compressing or uncompressing.
|
||||
The new LZMA Utils code base was renamed to XZ Utils when the name
|
||||
of the new file format had been decided. The liblzma compression
|
||||
library retained its name though, because changing it would have
|
||||
caused unnecessary breakage in applications already using the early
|
||||
liblzma snapshots.
|
||||
|
||||
The development of LZMA Utils 4.42.x is still in alpha stage. Several
|
||||
features are still missing or don't fully work yet. Documentation is
|
||||
also very minimal.
|
||||
The xz command line tool can emulate the gzip-like lzma tool by
|
||||
creating appropriate symlinks (e.g. lzma -> xz). Thus, practically
|
||||
all scripts using the lzma tool from LZMA Utils will work as is with
|
||||
XZ Utils (and will keep using the old .lzma format). Still, the .lzma
|
||||
format is more or less deprecated. XZ Utils will keep supporting it,
|
||||
but new applications should use the .xz format, and migrating old
|
||||
applications to .xz is often a good idea too.
|
||||
|
||||
|
||||
@@ -1,324 +0,0 @@
|
||||
|
||||
Advanced features of liblzma
|
||||
----------------------------
|
||||
|
||||
0. Introduction
|
||||
|
||||
Most developers need only the basic features of liblzma. These
|
||||
features allow single-threaded encoding and decoding of .lzma files
|
||||
in streamed mode.
|
||||
|
||||
In some cases developers want more. The .lzma file format is
|
||||
designed to allow multi-threaded encoding and decoding and limited
|
||||
random-access reading. These features are possible in non-streamed
|
||||
mode and limitedly also in streamed mode.
|
||||
|
||||
To take advange of these features, the application needs a custom
|
||||
.lzma file format handler. liblzma provides a set of tools to ease
|
||||
this task, but it's still quite a bit of work to get a good custom
|
||||
.lzma handler done.
|
||||
|
||||
|
||||
1. Where to begin
|
||||
|
||||
Start by reading the .lzma file format specification. Understanding
|
||||
the basics of the .lzma file structure is required to implement a
|
||||
custom .lzma file handler and to understand the rest of this document.
|
||||
|
||||
|
||||
2. The basic components
|
||||
|
||||
2.1. Stream Header and tail
|
||||
|
||||
Stream Header begins the .lzma Stream and Stream tail ends it. Stream
|
||||
Header is defined in the file format specification, but Stream tail
|
||||
isn't (thus I write "tail" with a lower-case letter). Stream tail is
|
||||
simply the Stream Flags and the Footer Magic Bytes fields together.
|
||||
It was done this way in liblzma, because the Block coders take care
|
||||
of the rest of the stuff in the Stream Footer.
|
||||
|
||||
For now, the size of Stream Header is fixed to 11 bytes. The header
|
||||
<lzma/stream_flags.h> defines LZMA_STREAM_HEADER_SIZE, which you
|
||||
should use instead of a hardcoded number. Similarly, Stream tail
|
||||
is fixed to 3 bytes, and there is a constant LZMA_STREAM_TAIL_SIZE.
|
||||
|
||||
It is possible, that a future version of the .lzma format will have
|
||||
variable-sized Stream Header and tail. As of writing, this seems so
|
||||
unlikely though, that it was considered simplest to just use a
|
||||
constant instead of providing a functions to get and store the sizes
|
||||
of the Stream Header and tail.
|
||||
|
||||
|
||||
2.x. Stream tail
|
||||
|
||||
For now, the size of Stream tail is fixed to 3 bytes. The header
|
||||
<lzma/stream_flags.h> defines LZMA_STREAM_TAIL_SIZE, which you
|
||||
should use instead of a hardcoded number.
|
||||
|
||||
|
||||
3. Keeping track of size information
|
||||
|
||||
The lzma_info_* functions found from <lzma/info.h> should ease the
|
||||
task of keeping track of sizes of the Blocks and also the Stream
|
||||
as a whole. Using these functions is strongly recommended, because
|
||||
there are surprisingly many situations where an error can occur,
|
||||
and these functions check for possible errors every time some new
|
||||
information becomes available.
|
||||
|
||||
If you find lzma_info_* functions lacking something that you would
|
||||
find useful, please contact the author.
|
||||
|
||||
|
||||
3.1. Start offset of the Stream
|
||||
|
||||
If you are storing the .lzma Stream inside anothe file format, or
|
||||
for some other reason are placing the .lzma Stream to somewhere
|
||||
else than to the beginning of the file, you should tell the starting
|
||||
offset of the Stream using lzma_info_start_offset_set().
|
||||
|
||||
The start offset of the Stream is used for two distinct purporses.
|
||||
First, knowing the start offset of the Stream allows
|
||||
lzma_info_alignment_get() to correctly calculate the alignment of
|
||||
every Block. This information is given to the Block encoder, which
|
||||
will calculate the size of Header Padding so that Compressed Data
|
||||
is alignment at an optimal offset.
|
||||
|
||||
Another use for start offset of the Stream is in random-access
|
||||
reading. If you set the start offset of the Stream, lzma_info_locate()
|
||||
will be able to calculate the offset relative to the beginning of the
|
||||
file containing the Stream (instead of offset relative to the
|
||||
beginning of the Stream).
|
||||
|
||||
|
||||
3.2. Size of Stream Header
|
||||
|
||||
While the size of Stream Header is constant (11 bytes) in the current
|
||||
version of the .lzma file format, this may change in future.
|
||||
|
||||
|
||||
3.3. Size of Header Metadata Block
|
||||
|
||||
This information is needed when doing random-access reading, and
|
||||
to verify the value of this field stored in Footer Metadata Block.
|
||||
|
||||
|
||||
3.4. Total Size of the Data Blocks
|
||||
|
||||
|
||||
3.5. Uncompressed Size of Data Blocks
|
||||
|
||||
|
||||
3.6. Index
|
||||
|
||||
|
||||
|
||||
|
||||
x. Alignment
|
||||
|
||||
There are a few slightly different types of alignment issues when
|
||||
working with .lzma files.
|
||||
|
||||
The .lzma format doesn't strictly require any kind of alignment.
|
||||
However, if the encoder carefully optimizes the alignment in all
|
||||
situations, it can improve compression ratio, speed of the encoder
|
||||
and decoder, and slightly help if the files get damaged and need
|
||||
recovery.
|
||||
|
||||
Alignment has the most significant effect compression ratio FIXME
|
||||
|
||||
|
||||
x.1. Compression ratio
|
||||
|
||||
Some filters take advantage of the alignment of the input data.
|
||||
To get the best compression ratio, make sure that you feed these
|
||||
filters correctly aligned data.
|
||||
|
||||
Some filters (e.g. LZMA) don't necessarily mind too much if the
|
||||
input doesn't match the preferred alignment. With these filters
|
||||
the penalty in compression ratio depends on the specific type of
|
||||
data being compressed.
|
||||
|
||||
Other filters (e.g. PowerPC executable filter) won't work at all
|
||||
with data that is improperly aligned. While the data can still
|
||||
be de-filtered back to its original form, the benefit of the
|
||||
filtering (better compression ratio) is completely lost, because
|
||||
these filters expect certain patterns at properly aligned offsets.
|
||||
The compression ratio may even worse with incorrectly aligned input
|
||||
than without the filter.
|
||||
|
||||
|
||||
x.1.1. Inter-filter alignment
|
||||
|
||||
When there are multiple filters chained, checking the alignment can
|
||||
be useful not only with the input of the first filter and output of
|
||||
the last filter, but also between the filters.
|
||||
|
||||
Inter-filter alignment important especially with the Subblock filter.
|
||||
|
||||
|
||||
x.1.2. Further compression with external tools
|
||||
|
||||
This is relatively rare situation in practice, but still worth
|
||||
understanding.
|
||||
|
||||
Let's say that there are several SPARC executables, which are each
|
||||
filtered to separate .lzma files using only the SPARC filter. If
|
||||
Uncompressed Size is written to the Block Header, the size of Block
|
||||
Header may vary between the .lzma files. If no Padding is used in
|
||||
the Block Header to correct the alignment, the starting offset of
|
||||
the Compressed Data field will be differently aligned in different
|
||||
.lzma files.
|
||||
|
||||
All these .lzma files are archived into a single .tar archive. Due
|
||||
to nature of the .tar format, every file is aligned inside the
|
||||
archive to an offset that is a multiple of 512 bytes.
|
||||
|
||||
The .tar archive is compressed into a new .lzma file using the LZMA
|
||||
filter with options, that prefer input alignment of four bytes. Now
|
||||
if the independent .lzma files don't have the same alignment of
|
||||
the Compressed Data fields, the LZMA filter will be unable to take
|
||||
advantage of the input alignment between the files in the .tar
|
||||
archive, which reduces compression ratio.
|
||||
|
||||
Thus, even if you have only single Block per file, it can be good for
|
||||
compression ratio to align the Compressed Data to optimal offset.
|
||||
|
||||
|
||||
x.2. Speed
|
||||
|
||||
Most modern computers are faster when multi-byte data is located
|
||||
at aligned offsets in RAM. Proper alignment of the Compressed Data
|
||||
fields can slightly increase the speed of some filters.
|
||||
|
||||
|
||||
x.3. Recovery
|
||||
|
||||
Aligning every Block Header to start at an offset with big enough
|
||||
alignment may ease or at least speed up recovery of broken files.
|
||||
|
||||
|
||||
y. Typical usage cases
|
||||
|
||||
y.x. Parsing the Stream backwards
|
||||
|
||||
You may need to parse the Stream backwards if you need to get
|
||||
information such as the sizes of the Stream, Index, or Extra.
|
||||
The basic procedure to do this follows.
|
||||
|
||||
Locate the end of the Stream. If the Stream is stored as is in a
|
||||
standalone .lzma file, simply seek to the end of the file and start
|
||||
reading backwards using appropriate buffer size. The file format
|
||||
specification allows arbitrary amount of Footer Padding (zero or more
|
||||
NUL bytes), which you skip before trying to decode the Stream tail.
|
||||
|
||||
Once you have located the end of the Stream (a non-NULL byte), make
|
||||
sure you have at least the last LZMA_STREAM_TAIL_SIZE bytes of the
|
||||
Stream in a buffer. If there isn't enough bytes left from the file,
|
||||
the file is too small to contain a valid Stream. Decode the Stream
|
||||
tail using lzma_stream_tail_decoder(). Store the offset of the first
|
||||
byte of the Stream tail; you will need it later.
|
||||
|
||||
You may now want to do some internal verifications e.g. if the Check
|
||||
type is supported by the liblzma build you are using.
|
||||
|
||||
Decode the Backward Size field with lzma_vli_reverse_decode(). The
|
||||
field is at maximum of LZMA_VLI_BYTES_MAX bytes long. Check that
|
||||
Backward Size is not zero. Store the offset of the first byte of
|
||||
the Backward Size; you will need it later.
|
||||
|
||||
Now you know the Total Size of the last Block of the Stream. It's the
|
||||
value of Backward Size plus the size of the Backward Size field. Note
|
||||
that you cannot use lzma_vli_size() to calculate the size since there
|
||||
might be padding; you need to use the real observed size of the
|
||||
Backward Size field.
|
||||
|
||||
At this point, the operation continues differently for Single-Block
|
||||
and Multi-Block Streams.
|
||||
|
||||
|
||||
y.x.1. Single-Block Stream
|
||||
|
||||
There might be Uncompressed Size field present in the Stream Footer.
|
||||
You cannot know it for sure unless you have already parsed the Block
|
||||
Header earlier. For security reasons, you probably want to try to
|
||||
decode the Uncompressed Size field, but you must not indicate any
|
||||
error if decoding fails. Later you can give the decoded Uncompressed
|
||||
Size to Block decoder if Uncopmressed Size isn't otherwise known;
|
||||
this prevents it from producing too much output in case of (possibly
|
||||
intentionally) corrupt file.
|
||||
|
||||
Calculate the the start offset of the Stream:
|
||||
|
||||
backward_offset - backward_size - LZMA_STREAM_HEADER_SIZE
|
||||
|
||||
backward_offset is the offset of the first byte of the Backward Size
|
||||
field. Remember to check for integer overflows, which can occur with
|
||||
invalid input files.
|
||||
|
||||
Seek to the beginning of the Stream. Decode the Stream Header using
|
||||
lzma_stream_header_decoder(). Verify that the decoded Stream Flags
|
||||
match the values found from Stream tail. You can use the
|
||||
lzma_stream_flags_is_equal() macro for this.
|
||||
|
||||
Decode the Block Header. Verify that it isn't a Metadata Block, since
|
||||
Single-Block Streams cannot have Metadata. If Uncompressed Size is
|
||||
present in the Block Header, the value you tried to decode from the
|
||||
Stream Footer must be ignored, since Uncompressed Size wasn't actually
|
||||
present there. If Block Header doesn't have Uncompressed Size, and
|
||||
decoding the Uncompressed Size field from the Stream Footer failed,
|
||||
the file is corrupt.
|
||||
|
||||
If you were only looking for the Uncompressed Size of the Stream,
|
||||
you now got that information, and you can stop processing the Stream.
|
||||
|
||||
To decode the Block, the same instructions apply as described in
|
||||
FIXME. However, because you have some extra known information decoded
|
||||
from the Stream Footer, you should give this information to the Block
|
||||
decoder so that it can verify it while decoding:
|
||||
- If Uncompressed Size is not present in the Block Header, set
|
||||
lzma_options_block.uncompressed_size to the value you decoded
|
||||
from the Stream Footer.
|
||||
- Always set lzma_options_block.total_size to backward_size +
|
||||
size_of_backward_size (you calculated this sum earlier already).
|
||||
|
||||
|
||||
y.x.2. Multi-Block Stream
|
||||
|
||||
Calculate the start offset of the Footer Metadata Block:
|
||||
|
||||
backward_offset - backward_size
|
||||
|
||||
backward_offset is the offset of the first byte of the Backward Size
|
||||
field. Remember to check for integer overflows, which can occur with
|
||||
broken input files.
|
||||
|
||||
Decode the Block Header. Verify that it is a Metadata Block. Set
|
||||
lzma_options_block.total_size to backward_size + size_of_backward_size
|
||||
(you calculated this sum earlier already). Then decode the Footer
|
||||
Metadata Block.
|
||||
|
||||
Store the decoded Footer Metadata to lzma_info structure using
|
||||
lzma_info_set_metadata(). Set also the offset of the Backward Size
|
||||
field using lzma_info_size_set(). Then you can get the start offset
|
||||
of the Stream using lzma_info_size_get(). Note that any of these steps
|
||||
may fail so don't omit error checking.
|
||||
|
||||
Seek to the beginning of the Stream. Decode the Stream Header using
|
||||
lzma_stream_header_decoder(). Verify that the decoded Stream Flags
|
||||
match the values found from Stream tail. You can use the
|
||||
lzma_stream_flags_is_equal() macro for this.
|
||||
|
||||
If you were only looking for the Uncompressed Size of the Stream,
|
||||
it's possible that you already have it now. If Uncompressed Size (or
|
||||
whatever information you were looking for) isn't available yet,
|
||||
continue by decoding also the Header Metadata Block. (If some
|
||||
information is missing, the Header Metadata Block has to be present.)
|
||||
|
||||
Decoding the Data Blocks goes the same way as described in FIXME.
|
||||
|
||||
|
||||
y.x.3. Variations
|
||||
|
||||
If you know the offset of the beginning of the Stream, you may want
|
||||
to parse the Stream Header before parsing the Stream tail.
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
|
||||
Hacking liblzma
|
||||
---------------
|
||||
|
||||
0. Preface
|
||||
|
||||
This document gives some overall information about the internals of
|
||||
liblzma, which should make it easier to start reading and modifying
|
||||
the code.
|
||||
|
||||
|
||||
1. Programming language
|
||||
|
||||
liblzma was written in C99. If you use GCC, this means that you need
|
||||
at least GCC 3.x.x. GCC 2 isn't and won't be supported.
|
||||
|
||||
Some GCC-specific extensions are used *conditionally*. They aren't
|
||||
required to build a full-featured library. Don't make the code rely
|
||||
on any non-standard compiler extensions or even C99 features that
|
||||
aren't portable between almost-C99 compatible compilers (for example
|
||||
non-static inlines).
|
||||
|
||||
The public API headers are in C89. This is to avoid frustrating those
|
||||
who maintain programs, which are strictly in C89 or C++.
|
||||
|
||||
An assumption about sizeof(size_t) is made. If this assumption is
|
||||
wrong, some porting is probably needed:
|
||||
|
||||
sizeof(uint32_t) <= sizeof(size_t) <= sizeof(uint64_t)
|
||||
|
||||
|
||||
2. Internal vs. external API
|
||||
|
||||
|
||||
|
||||
Input Output
|
||||
v Application ^
|
||||
| liblzma public API |
|
||||
| Stream coder |
|
||||
| Block coder |
|
||||
| Filter coder |
|
||||
| ... |
|
||||
v Filter coder ^
|
||||
|
||||
|
||||
Application
|
||||
`-- liblzma public API
|
||||
`-- Stream coder
|
||||
|-- Stream info handler
|
||||
|-- Stream Header coder
|
||||
|-- Block Header coder
|
||||
| `-- Filter Flags coder
|
||||
|-- Metadata coder
|
||||
| `-- Block coder
|
||||
| `-- Filter 0
|
||||
| `-- Filter 1
|
||||
| ...
|
||||
|-- Data Block coder
|
||||
| `-- Filter 0
|
||||
| `-- Filter 1
|
||||
| ...
|
||||
`-- Stream tail coder
|
||||
|
||||
|
||||
|
||||
x. Designing new filters
|
||||
|
||||
All filters must be designed so that the decoder cannot consume
|
||||
arbitrary amount input without producing any decoded output. Failing
|
||||
to follow this rule makes liblzma vulnerable to DoS attacks if
|
||||
untrusted files are decoded (usually they are untrusted).
|
||||
|
||||
An example should clarify the reason behind this requirement: There
|
||||
are two filters in the chain. The decoder of the first filter produces
|
||||
huge amount of output (many gigabytes or more) with a few bytes of
|
||||
input, which gets passed to the decoder of the second filter. If the
|
||||
data passed to the second filter is interpreted as something that
|
||||
produces no output (e.g. padding), the filter chain as a whole
|
||||
produces no output and consumes no input for a long period of time.
|
||||
|
||||
The above problem was present in the first versions of the Subblock
|
||||
filter. A tiny .lzma file could have taken several years to decode
|
||||
while it wouldn't produce any output at all. The problem was fixed
|
||||
by adding limits for number of consecutive Padding bytes, and requiring
|
||||
that some decoded output must be produced between Set Subfilter and
|
||||
Unset Subfilter.
|
||||
|
||||
|
||||
x. Implementing new filters
|
||||
|
||||
If the filter supports embedding End of Payload Marker, make sure that
|
||||
when your filter detects End of Payload Marker,
|
||||
- the usage of End of Payload Marker is actually allowed (i.e. End
|
||||
of Input isn't used); and
|
||||
- it also checks that there is no more input coming from the next
|
||||
filter in the chain.
|
||||
|
||||
The second requirement is slightly tricky. It's possible that the next
|
||||
filter hasn't returned LZMA_STREAM_END yet. It may even need a few
|
||||
bytes more input before it will do so. You need to give it as much
|
||||
input as it needs, and verify that it doesn't produce any output.
|
||||
|
||||
Don't call the next filter in the chain after it has returned
|
||||
LZMA_STREAM_END (except in encoder if action == LZMA_SYNC_FLUSH).
|
||||
It will result undefined behavior.
|
||||
|
||||
Be pedantic. If the input data isn't exactly valid, reject it.
|
||||
|
||||
At the moment, liblzma isn't modular. You will need to edit several
|
||||
files in src/liblzma/common to include support for a new filter. grep
|
||||
for LZMA_FILTER_LZMA to locate the files needing changes.
|
||||
|
||||
@@ -1,188 +0,0 @@
|
||||
|
||||
Introduction to liblzma
|
||||
-----------------------
|
||||
|
||||
Writing applications to work with liblzma
|
||||
|
||||
liblzma API is split in several subheaders to improve readability and
|
||||
maintainance. The subheaders must not be #included directly; simply
|
||||
use `#include <lzma.h>' instead.
|
||||
|
||||
Those who have used zlib should find liblzma's API easy to use.
|
||||
To developers who haven't used zlib before, I recommend learning
|
||||
zlib first, because zlib has excellent documentation.
|
||||
|
||||
While the API is similar to that of zlib, there are some major
|
||||
differences, which are summarized below.
|
||||
|
||||
For basic stream encoding, zlib has three functions (deflateInit(),
|
||||
deflate(), and deflateEnd()). Similarly, there are three functions
|
||||
for stream decoding (inflateInit(), inflate(), and inflateEnd()).
|
||||
liblzma has only single coding and ending function. Thus, to
|
||||
encode one may use, for example, lzma_stream_encoder_single(),
|
||||
lzma_code(), and lzma_end(). Simlarly for decoding, one may
|
||||
use lzma_auto_decoder(), lzma_code(), and lzma_end().
|
||||
|
||||
zlib has deflateReset() and inflateReset() to reset the stream
|
||||
structure without reallocating all the memory. In liblzma, all
|
||||
coder initialization functions are like zlib's reset functions:
|
||||
the first-time initializations are done with the same functions
|
||||
as the reinitializations (resetting).
|
||||
|
||||
To make all this work, liblzma needs to know when lzma_stream
|
||||
doesn't already point to an allocated and initialized coder.
|
||||
This is achieved by initializing lzma_stream structure with
|
||||
LZMA_STREAM_INIT (static initialization) or LZMA_STREAM_INIT_VAR
|
||||
(for exampple when new lzma_stream has been allocated with malloc()).
|
||||
This initialization should be done exactly once per lzma_stream
|
||||
structure to avoid leaking memory. Calling lzma_end() will leave
|
||||
lzma_stream into a state comparable to the state achieved with
|
||||
LZMA_STREAM_INIT and LZMA_STREAM_INIT_VAR.
|
||||
|
||||
Example probably clarifies a lot. With zlib, compression goes
|
||||
roughly like this:
|
||||
|
||||
z_stream strm;
|
||||
deflateInit(&strm, level);
|
||||
deflate(&strm, Z_RUN);
|
||||
deflate(&strm, Z_RUN);
|
||||
...
|
||||
deflate(&strm, Z_FINISH);
|
||||
deflateEnd(&strm) or deflateReset(&strm)
|
||||
|
||||
With liblzma, it's slightly different:
|
||||
|
||||
lzma_stream strm = LZMA_STREAM_INIT;
|
||||
lzma_stream_encoder_single(&strm, &options);
|
||||
lzma_code(&strm, LZMA_RUN);
|
||||
lzma_code(&strm, LZMA_RUN);
|
||||
...
|
||||
lzma_code(&strm, LZMA_FINISH);
|
||||
lzma_end(&strm) or reinitialize for new coding work
|
||||
|
||||
Reinitialization in the last step can be any function that can
|
||||
initialize lzma_stream; it doesn't need to be the same function
|
||||
that was used for the previous initialization. If it is the same
|
||||
function, liblzma will usually be able to re-use most of the
|
||||
existing memory allocations (depends on how much the initialization
|
||||
options change). If you reinitialize with different function,
|
||||
liblzma will automatically free the memory of the previous coder.
|
||||
|
||||
|
||||
File formats
|
||||
|
||||
liblzma supports multiple container formats for the compressed data.
|
||||
Different initialization functions initialize the lzma_stream to
|
||||
process different container formats. See the details from the public
|
||||
header files.
|
||||
|
||||
The following functions are the most commonly used:
|
||||
|
||||
- lzma_stream_encoder_single(): Encodes Single-Block Stream; this
|
||||
the recommended format for most purporses.
|
||||
|
||||
- lzma_alone_encoder(): Useful if you need to encode into the
|
||||
legacy LZMA_Alone format.
|
||||
|
||||
- lzma_auto_decoder(): Decoder that automatically detects the
|
||||
file format; recommended when you decode compressed files on
|
||||
disk, because this way compatibility with the legacy LZMA_Alone
|
||||
format is transparent.
|
||||
|
||||
- lzma_stream_decoder(): Decoder for Single- and Multi-Block
|
||||
Streams; this is good if you want to accept only .lzma Streams.
|
||||
|
||||
|
||||
Filters
|
||||
|
||||
liblzma supports multiple filters (algorithm implementations). The new
|
||||
.lzma format supports filter-chain having up to seven filters. In the
|
||||
filter chain, the output of one filter is input of the next filter in
|
||||
the chain. The legacy LZMA_Alone format supports only one filter, and
|
||||
that must always be LZMA.
|
||||
|
||||
General-purporse compression:
|
||||
|
||||
LZMA The main algorithm of liblzma (surprise!)
|
||||
|
||||
Branch/Call/Jump filters for executables:
|
||||
|
||||
x86 This filter is known as BCJ in 7-Zip
|
||||
IA64 IA-64 (Itanium)
|
||||
PowerPC Big endian PowerPC
|
||||
ARM
|
||||
ARM-Thumb
|
||||
SPARC
|
||||
|
||||
Other filters:
|
||||
|
||||
Copy Dummy filter that simply copies all the data
|
||||
from input to output.
|
||||
|
||||
Subblock Multi-purporse filter, that can
|
||||
- embed End of Payload Marker if the previous
|
||||
filter in the chain doesn't support it; and
|
||||
- apply Subfilters, which filter only part
|
||||
of the same compressed Block in the Stream.
|
||||
|
||||
Branch/Call/Jump filters never change the size of the data. They
|
||||
should usually be used as a pre-filter for some compression filter
|
||||
like LZMA.
|
||||
|
||||
|
||||
Integrity checks
|
||||
|
||||
The .lzma Stream format uses CRC32 as the integrity check for
|
||||
different file format headers. It is possible to omit CRC32 from
|
||||
the Block Headers, but not from Stream Header. This is the reason
|
||||
why CRC32 code cannot be disabled when building liblzma (in addition,
|
||||
the LZMA encoder uses CRC32 for hashing, so that's another reason).
|
||||
|
||||
The integrity check of the actual data is calculated from the
|
||||
uncompressed data. This check can be CRC32, CRC64, or SHA256.
|
||||
It can also be omitted completely, although that usually is not
|
||||
a good thing to do. There are free IDs left, so support for new
|
||||
checks algorithms can be added later.
|
||||
|
||||
|
||||
API and ABI stability
|
||||
|
||||
The API and ABI of liblzma isn't stable yet, although no huge
|
||||
changes should happen. One potential place for change is the
|
||||
lzma_options_subblock structure.
|
||||
|
||||
In the 4.42.0alpha phase, the shared library version number won't
|
||||
be updated even if ABI breaks. I don't want to track the ABI changes
|
||||
yet. Just rebuild everything when you upgrade liblzma until we get
|
||||
to the beta stage.
|
||||
|
||||
|
||||
Size of the library
|
||||
|
||||
While liblzma isn't huge, it is quite far from the smallest possible
|
||||
LZMA implementation: full liblzma binary (with support for all
|
||||
filters and other features) is way over 100 KiB, but the plain raw
|
||||
LZMA decoder is only 5-10 KiB.
|
||||
|
||||
To decrease the size of the library, you can omit parts of the library
|
||||
by passing certain options to the `configure' script. Disabling
|
||||
everything but the decoders of the require filters will usually give
|
||||
you a small enough library, but if you need a decoder for example
|
||||
embedded in the operating system kernel, the code from liblzma probably
|
||||
isn't suitable as is.
|
||||
|
||||
If you need a minimal implementation supporting .lzma Streams, you
|
||||
may need to do partial rewrite. liblzma uses stateful API like zlib.
|
||||
That increases the size of the library. Using callback API or even
|
||||
simpler buffer-to-buffer API would allow smaller implementation.
|
||||
|
||||
LZMA SDK contains smaller LZMA decoder written in ANSI-C than
|
||||
liblzma, so you may want to take a look at that code. However,
|
||||
it doesn't (at least not yet) support the new .lzma Stream format.
|
||||
|
||||
|
||||
Documentation
|
||||
|
||||
There's no other documentation than the public headers and this
|
||||
text yet. Real docs will be written some day, I hope.
|
||||
|
||||
@@ -1,219 +0,0 @@
|
||||
|
||||
Using liblzma securely
|
||||
----------------------
|
||||
|
||||
0. Introduction
|
||||
|
||||
This document discusses how to use liblzma securely. There are issues
|
||||
that don't apply to zlib or libbzip2, so reading this document is
|
||||
strongly recommended even for those who are very familiar with zlib
|
||||
or libbzip2.
|
||||
|
||||
While making liblzma itself as secure as possible is essential, it's
|
||||
out of scope of this document.
|
||||
|
||||
|
||||
1. Memory usage
|
||||
|
||||
The memory usage of liblzma varies a lot.
|
||||
|
||||
|
||||
1.1. Problem sources
|
||||
|
||||
1.1.1. Block coder
|
||||
|
||||
The memory requirements of Block encoder depend on the used filters
|
||||
and their settings. The memory requirements of the Block decoder
|
||||
depend on the which filters and with which filter settings the Block
|
||||
was encoded. Usually the memory requirements of a decoder are equal
|
||||
or less than the requirements of the encoder with the same settings.
|
||||
|
||||
While the typical memory requirements to decode a Block is from a few
|
||||
hundred kilobytes to tens of megabytes, a maliciously constructed
|
||||
files can require a lot more RAM to decode. With the current filters,
|
||||
the maximum amount is about 7 GiB. If you use multi-threaded decoding,
|
||||
every Block can require this amount of RAM, thus a four-threaded
|
||||
decoder could suddenly try to allocate 28 GiB of RAM.
|
||||
|
||||
If you don't limit the maximum memory usage in any way, and there are
|
||||
no resource limits set on the operating system side, one malicious
|
||||
input file can run the system out of memory, or at least make it swap
|
||||
badly for a long time. This is exceptionally bad on servers e.g.
|
||||
email server doing virus scanning on incoming messages.
|
||||
|
||||
|
||||
1.1.2. Metadata decoder
|
||||
|
||||
Multi-Block .lzma files contain at least one Metadata Block.
|
||||
Externally the Metadata Blocks are similar to Data Blocks, so all
|
||||
the issues mentioned about memory usage of Data Blocks applies to
|
||||
Metadata Blocks too.
|
||||
|
||||
The uncompressed content of Metadata Blocks contain information about
|
||||
the Stream as a whole, and optionally some Extra Records. The
|
||||
information about the Stream is kept in liblzma's internal data
|
||||
structures in RAM. Extra Records can contain arbitrary data. They are
|
||||
not interpreted by liblzma, but liblzma will provide them to the
|
||||
application in uninterpreted form if the application wishes so.
|
||||
|
||||
Usually the Uncompressed Size of a Metadata Block is small. Even on
|
||||
extreme cases, it shouldn't be much bigger than a few megabytes. Once
|
||||
the Metadata has been parsed into native data structures in liblzma,
|
||||
it usually takes a little more memory than in the encoded form. For
|
||||
all normal files, this is no problem, since the resulting memory usage
|
||||
won't be too much.
|
||||
|
||||
The problem is that a maliciously constructed Metadata Block can
|
||||
contain huge amount of "information", which liblzma will try to store
|
||||
in its internal data structures. This may cause liblzma to allocate
|
||||
all the available RAM unless some kind of resource usage limits are
|
||||
applied.
|
||||
|
||||
Note that the Extra Records in Metadata are always parsed but, but
|
||||
memory is allocated for them only if the application has requested
|
||||
liblzma to provide the Extra Records to the application.
|
||||
|
||||
|
||||
1.2. Solutions
|
||||
|
||||
If you need to decode files from untrusted sources (most people do),
|
||||
you must limit the memory usage to avoid denial of service (DoS)
|
||||
conditions caused by malicious input files.
|
||||
|
||||
The first step is to find out how much memory you are allowed consume
|
||||
at maximum. This may be a hardcoded constant or derived from the
|
||||
available RAM; whatever is appropriate in the application.
|
||||
|
||||
The simplest solution is to use setrlimit() if the kernel supports
|
||||
RLIMIT_AS, which limits the memory usage of the whole process.
|
||||
For more portable and fine-grained limitting, you can use
|
||||
memory limitter functions found from <lzma/memlimit.h>.
|
||||
|
||||
|
||||
1.2.1. Encoder
|
||||
|
||||
lzma_memory_usage() will give you a rough estimate about the memory
|
||||
usage of the given filter chain. To dramatically simplify the internal
|
||||
implementation, this function doesn't take into account all the small
|
||||
helper data structures needed in various places; only the structures
|
||||
with significant memory usage are taken into account. Still, the
|
||||
accuracy of this function should be well within a mebibyte.
|
||||
|
||||
The Subblock filter is a special case. If a Subfilter has been
|
||||
specified, it isn't taken into account when lzma_memory_usage()
|
||||
calculates the memory usage. You need to calculate the memory usage
|
||||
of the Subfilter separately.
|
||||
|
||||
Keeping track of Blocks in a Multi-Block Stream takes a few dozen
|
||||
bytes of RAM per Block (size of the lzma_index structure plus overhead
|
||||
of malloc()). It isn't a good idea to put tens of thousands of Blocks
|
||||
into a Stream unless you have a very good reason to do so (compressed
|
||||
dictionary could be an example of such situation).
|
||||
|
||||
Also keep the number and sizes of Extra Records sane. If you produce
|
||||
the list of Extra Records automatically from some untrusted source,
|
||||
you should not only validate the content of these Records, but also
|
||||
their memory usage.
|
||||
|
||||
|
||||
1.2.2. Decoder
|
||||
|
||||
A single-threaded decoder should simply use a memory limitter and
|
||||
indicate an error if it runs out of memory.
|
||||
|
||||
Memory-limitting with multi-threaded decoding is tricky. The simple
|
||||
solution is to divide the maximum allowed memory usage with the
|
||||
maximum allowed threads, and give each Block decoder their own
|
||||
independent lzma_memory_limitter. The drawback is that if one Block
|
||||
needs notably more RAM than any other Block, the decoder will run out
|
||||
of memory when in reality there would be plenty of free RAM.
|
||||
|
||||
An attractive alternative would be using shared lzma_memory_limitter.
|
||||
Depending on the application and the expected type of input, this may
|
||||
either be the best solution or a source of hard-to-repeat problems.
|
||||
Consider the following requirements:
|
||||
- You use at maximum of n threads.
|
||||
- x(i) is the decoder memory requirements of the Block number i
|
||||
in an expected input Stream.
|
||||
- The memory limitter is set to higher value than the sum of n
|
||||
highest values x(i).
|
||||
|
||||
(If you are better at explaining the above conditions, please
|
||||
contribute your improved version.)
|
||||
|
||||
If the above conditions aren't met, it is possible that the decoding
|
||||
will fail unpredictably. That is, on the same machine using the same
|
||||
settings, the decoding may sometimes succeed and sometimes fail. This
|
||||
is because sometimes threads may run so that the Blocks with highest
|
||||
memory usage are tried to be decoded at the same time.
|
||||
|
||||
Most .lzma files have all the Blocks encoded with identical settings,
|
||||
or at least the memory usage won't vary dramatically. That's why most
|
||||
multi-threaded decoders probably want to use the simple "separate
|
||||
lzma_memory_limitter for each thread" solution, possibly fallbacking
|
||||
to single-threaded mode in case the per-thread memory limits aren't
|
||||
enough in multi-threaded mode.
|
||||
|
||||
FIXME: Memory usage of Stream info.
|
||||
|
||||
[
|
||||
|
||||
]
|
||||
|
||||
|
||||
2. Huge uncompressed output
|
||||
|
||||
2.1. Data Blocks
|
||||
|
||||
Decoding a tiny .lzma file can produce huge amount of uncompressed
|
||||
output. There is an example file of 45 bytes, which decodes to 64 PiB
|
||||
(that's 2^56 bytes). Uncompressing such a file to disk is likely to
|
||||
fill even a bigger disk array. If the data is written to a pipe, it
|
||||
may not fill the disk, but would still take very long time to finish.
|
||||
|
||||
To avoid denial of service conditions caused by huge amount of
|
||||
uncompressed output, applications using liblzma should use some method
|
||||
to limit the amount of output produced. The exact method depends on
|
||||
the application.
|
||||
|
||||
All valid .lzma Streams make it possible to find out the uncompressed
|
||||
size of the Stream without actually uncompressing the data. This
|
||||
information is available in at least one of the Metadata Blocks.
|
||||
Once the uncompressed size is parsed, the decoder can verify that
|
||||
it doesn't exceed certain limits (e.g. available disk space).
|
||||
|
||||
When the uncompressed size is known, the decoder can actively keep
|
||||
track of the amount of output produced so far, and that it doesn't
|
||||
exceed the known uncompressed size. If it does exceed, the file is
|
||||
known to be corrupt and an error should be indicated without
|
||||
continuing to decode the rest of the file.
|
||||
|
||||
Unfortunately, finding the uncompressed size beforehand is often
|
||||
possible only in non-streamed mode, because the needed information
|
||||
could be in the Footer Metdata Block, which (obviously) is at the
|
||||
end of the Stream. In purely streamed mode decoding, one may need to
|
||||
use some rough arbitrary limits to prevent the problems described in
|
||||
the beginning of this section.
|
||||
|
||||
|
||||
2.2. Metadata
|
||||
|
||||
Metadata is stored in Metadata Blocks, which are very similar to
|
||||
Data Blocks. Thus, the uncompressed size can be huge just like with
|
||||
Data Blocks. The difference is, that the contents of Metadata Blocks
|
||||
aren't given to the application as is, but parsed by liblzma. Still,
|
||||
reading through a huge Metadata can take very long time, effectively
|
||||
creating a denial of service like piping decoded a Data Block to
|
||||
another process would do.
|
||||
|
||||
At first it would seem that using a memory limitter would prevent
|
||||
this issue as a side effect. But it does so only if the application
|
||||
requests liblzma to allocate the Extra Records and provide them to
|
||||
the application. If Extra Records aren't requested, they aren't
|
||||
allocated either. Still, the Extra Records are being read through
|
||||
to validate that the Metadata is in proper format.
|
||||
|
||||
The solution is to limit the Uncompressed Size of a Metadata Block
|
||||
to some relatively large value. This will make liblzma to give an
|
||||
error when the given limit is reached.
|
||||
|
||||
166
doc/lzma-file-format.txt
Normal file
166
doc/lzma-file-format.txt
Normal file
@@ -0,0 +1,166 @@
|
||||
|
||||
The .lzma File Format
|
||||
=====================
|
||||
|
||||
0. Preface
|
||||
0.1. Notices and Acknowledgements
|
||||
0.2. Changes
|
||||
1. File Format
|
||||
1.1. Header
|
||||
1.1.1. Properties
|
||||
1.1.2. Dictionary Size
|
||||
1.1.3. Uncompressed Size
|
||||
1.2. LZMA Compressed Data
|
||||
2. References
|
||||
|
||||
|
||||
0. Preface
|
||||
|
||||
This document describes the .lzma file format, which is
|
||||
sometimes also called LZMA_Alone format. It is a legacy file
|
||||
format, which is being or has been replaced by the .xz format.
|
||||
The MIME type of the .lzma format is `application/x-lzma'.
|
||||
|
||||
The most commonly used software to handle .lzma files are
|
||||
LZMA SDK, LZMA Utils, 7-Zip, and XZ Utils. This document
|
||||
describes some of the differences between these implementations
|
||||
and gives hints what subset of the .lzma format is the most
|
||||
portable.
|
||||
|
||||
|
||||
0.1. Notices and Acknowledgements
|
||||
|
||||
This file format was designed by Igor Pavlov for use in
|
||||
LZMA SDK. This document was written by Lasse Collin
|
||||
<lasse.collin@tukaani.org> using the documentation found
|
||||
from the LZMA SDK.
|
||||
|
||||
This document has been put into the public domain.
|
||||
|
||||
|
||||
0.2. Changes
|
||||
|
||||
Last modified: 2011-04-12 11:55+0300
|
||||
|
||||
|
||||
1. File Format
|
||||
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+==========================+
|
||||
| Header | LZMA Compressed Data |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+==========================+
|
||||
|
||||
The .lzma format file consist of 13-byte Header followed by
|
||||
the LZMA Compressed Data.
|
||||
|
||||
Unlike the .gz, .bz2, and .xz formats, it is not possible to
|
||||
concatenate multiple .lzma files as is and expect the
|
||||
decompression tool to decode the resulting file as if it were
|
||||
a single .lzma file.
|
||||
|
||||
For example, the command line tools from LZMA Utils and
|
||||
LZMA SDK silently ignore all the data after the first .lzma
|
||||
stream. In contrast, the command line tool from XZ Utils
|
||||
considers the .lzma file to be corrupt if there is data after
|
||||
the first .lzma stream.
|
||||
|
||||
|
||||
1.1. Header
|
||||
|
||||
+------------+----+----+----+----+--+--+--+--+--+--+--+--+
|
||||
| Properties | Dictionary Size | Uncompressed Size |
|
||||
+------------+----+----+----+----+--+--+--+--+--+--+--+--+
|
||||
|
||||
|
||||
1.1.1. Properties
|
||||
|
||||
The Properties field contains three properties. An abbreviation
|
||||
is given in parentheses, followed by the value range of the
|
||||
property. The field consists of
|
||||
|
||||
1) the number of literal context bits (lc, [0, 8]);
|
||||
2) the number of literal position bits (lp, [0, 4]); and
|
||||
3) the number of position bits (pb, [0, 4]).
|
||||
|
||||
The properties are encoded using the following formula:
|
||||
|
||||
Properties = (pb * 5 + lp) * 9 + lc
|
||||
|
||||
The following C code illustrates a straightforward way to
|
||||
decode the Properties field:
|
||||
|
||||
uint8_t lc, lp, pb;
|
||||
uint8_t prop = get_lzma_properties();
|
||||
if (prop > (4 * 5 + 4) * 9 + 8)
|
||||
return LZMA_PROPERTIES_ERROR;
|
||||
|
||||
pb = prop / (9 * 5);
|
||||
prop -= pb * 9 * 5;
|
||||
lp = prop / 9;
|
||||
lc = prop - lp * 9;
|
||||
|
||||
XZ Utils has an additional requirement: lc + lp <= 4. Files
|
||||
which don't follow this requirement cannot be decompressed
|
||||
with XZ Utils. Usually this isn't a problem since the most
|
||||
common lc/lp/pb values are 3/0/2. It is the only lc/lp/pb
|
||||
combination that the files created by LZMA Utils can have,
|
||||
but LZMA Utils can decompress files with any lc/lp/pb.
|
||||
|
||||
|
||||
1.1.2. Dictionary Size
|
||||
|
||||
Dictionary Size is stored as an unsigned 32-bit little endian
|
||||
integer. Any 32-bit value is possible, but for maximum
|
||||
portability, only sizes of 2^n and 2^n + 2^(n-1) should be
|
||||
used.
|
||||
|
||||
LZMA Utils creates only files with dictionary size 2^n,
|
||||
16 <= n <= 25. LZMA Utils can decompress files with any
|
||||
dictionary size.
|
||||
|
||||
XZ Utils creates and decompresses .lzma files only with
|
||||
dictionary sizes 2^n and 2^n + 2^(n-1). If some other
|
||||
dictionary size is specified when compressing, the value
|
||||
stored in the Dictionary Size field is a rounded up, but the
|
||||
specified value is still used in the actual compression code.
|
||||
|
||||
|
||||
1.1.3. Uncompressed Size
|
||||
|
||||
Uncompressed Size is stored as unsigned 64-bit little endian
|
||||
integer. A special value of 0xFFFF_FFFF_FFFF_FFFF indicates
|
||||
that Uncompressed Size is unknown. End of Payload Marker (*)
|
||||
is used if and only if Uncompressed Size is unknown.
|
||||
|
||||
XZ Utils rejects files whose Uncompressed Size field specifies
|
||||
a known size that is 256 GiB or more. This is to reject false
|
||||
positives when trying to guess if the input file is in the
|
||||
.lzma format. When Uncompressed Size is unknown, there is no
|
||||
limit for the uncompressed size of the file.
|
||||
|
||||
(*) Some tools use the term End of Stream (EOS) marker
|
||||
instead of End of Payload Marker.
|
||||
|
||||
|
||||
1.2. LZMA Compressed Data
|
||||
|
||||
Detailed description of the format of this field is out of
|
||||
scope of this document.
|
||||
|
||||
|
||||
2. References
|
||||
|
||||
LZMA SDK - The original LZMA implementation
|
||||
http://7-zip.org/sdk.html
|
||||
|
||||
7-Zip
|
||||
http://7-zip.org/
|
||||
|
||||
LZMA Utils - LZMA adapted to POSIX-like systems
|
||||
http://tukaani.org/lzma/
|
||||
|
||||
XZ Utils - The next generation of LZMA Utils
|
||||
http://tukaani.org/xz/
|
||||
|
||||
The .xz file format - The successor of the .lzma format
|
||||
http://tukaani.org/xz/xz-file-format.txt
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
|
||||
Introduction to the lzma command line tool
|
||||
------------------------------------------
|
||||
|
||||
Overview
|
||||
|
||||
The lzma command line tool is similar to gzip and bzip2, but for
|
||||
compressing and uncompressing .lzma files.
|
||||
|
||||
|
||||
Supported file formats
|
||||
|
||||
By default, the tool creates files in the new .lzma format. This can
|
||||
be overriden with --format=FMT command line option. Use --format=alone
|
||||
to create files in the old LZMA_Alone format.
|
||||
|
||||
By default, the tool uncompresses both the new .lzma format and
|
||||
LZMA_Alone format. This is to make it transparent to switch from
|
||||
the old LZMA_Alone format to the new .lzma format. Since both
|
||||
formats use the same filename suffix, average user should never
|
||||
notice which format was used.
|
||||
|
||||
|
||||
Differences to gzip and bzip2
|
||||
|
||||
Standard input and output
|
||||
|
||||
Both gzip and bzip2 refuse to write compressed data to a terminal and
|
||||
read compressed data from a terminal. With gzip (but not with bzip2),
|
||||
this can be overriden with the `--force' option. lzma follows the
|
||||
behavior of gzip here.
|
||||
|
||||
Usage of LZMA_OPT environment variable
|
||||
|
||||
gzip and bzip2 read GZIP and BZIP2 environment variables at startup.
|
||||
These variables may contain extra command line options.
|
||||
|
||||
gzip and bzip2 allow passing not only options, but also end-of-options
|
||||
indicator (`--') and filenames via the environment variable. No quoting
|
||||
is supported with the filenames.
|
||||
|
||||
Here are examples with gzip. bzip2 behaves identically.
|
||||
|
||||
bash$ echo asdf > 'foo bar'
|
||||
bash$ GZIP='"foo bar"' gzip
|
||||
gzip: "foo: No such file or directory
|
||||
gzip: bar": No such file or directory
|
||||
|
||||
bash$ GZIP=-- gzip --help
|
||||
gzip: --help: No such file or directory
|
||||
|
||||
lzma silently ignores all non-option arguments given via the
|
||||
environment variable LZMA_OPT. Like on the command line, everything
|
||||
after `--' is taken as non-options, and thus ignored in LZMA_OPT.
|
||||
|
||||
bash$ LZMA_OPT='--help' lzma --version # Displays help
|
||||
bash$ LZMA_OPT='-- --help' lzma --version # Displays version
|
||||
|
||||
|
||||
Filter chain presets
|
||||
|
||||
Like in gzip and bzip2, lzma supports numbered presets from 1 to 9
|
||||
where 1 is the fastest and 9 the best compression. 1 and 2 are for
|
||||
fast compressing with small memory usage, 3 to 6 for good compression
|
||||
ratio with medium memory usage, and 7 to 9 for excellent compression
|
||||
ratio with higher memory requirements. The default is 7 if memory
|
||||
usage limit allows.
|
||||
|
||||
In future, there will probably be an option like --preset=NAME, which
|
||||
will contain more special presets for specific file types.
|
||||
|
||||
It's also possible that there will be some heuristics to select good
|
||||
filters. For example, the tool could detect when a .tar archive is
|
||||
being compressed, and enable x86 filter only for those files in the
|
||||
.tar archive that are ELF or PE executables for x86.
|
||||
|
||||
|
||||
Specifying custom filter chains
|
||||
|
||||
Custom filter chains are specified by using long options with the name
|
||||
of the filters in correct order. For example, to pass the input data to
|
||||
the x86 filter and the output of that to the LZMA filter, the following
|
||||
command will do:
|
||||
|
||||
lzma --x86 --lzma filename
|
||||
|
||||
Some filters accept options, which are specified as a comma-separated
|
||||
list of key=value pairs:
|
||||
|
||||
lzma --delta=distance=4 --lzma=dict=4Mi,lc=8,lp=2 filename
|
||||
|
||||
|
||||
Memory usage control
|
||||
|
||||
By default, the command line tool limits memory usage to 1/3 of the
|
||||
available physical RAM. If no preset or custom filter chain has been
|
||||
given, the default preset will be used. If the memory limit is too
|
||||
low for the default preset, the tool will silently switch to lower
|
||||
preset.
|
||||
|
||||
When a preset or a custom filter chain has been specified and the
|
||||
memory limit is too low, an error message is displayed and no files
|
||||
are processed.
|
||||
|
||||
If the decoder hits the memory usage limit, an error is displayed and
|
||||
no more files are processed.
|
||||
|
||||
1150
doc/xz-file-format.txt
Normal file
1150
doc/xz-file-format.txt
Normal file
File diff suppressed because it is too large
Load Diff
146
dos/Makefile
Normal file
146
dos/Makefile
Normal file
@@ -0,0 +1,146 @@
|
||||
###############################################################################
|
||||
#
|
||||
# Makefile to build XZ Utils using DJGPP
|
||||
#
|
||||
# Author: Lasse Collin
|
||||
#
|
||||
# This file has been put into the public domain.
|
||||
# You can do whatever you want with this file.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
# For debugging, set comment "#define NDEBUG 1" from config.h to enable
|
||||
# the assert() macro, set STRIP=rem to disable stripping, and finally
|
||||
# e.g. CFLAGS="-g -O0".
|
||||
CC = gcc
|
||||
STRIP = strip
|
||||
CPPFLAGS =
|
||||
CFLAGS = -g -Wall -Wextra -Wfatal-errors -march=i386 -mtune=i686 -O2
|
||||
LDFLAGS =
|
||||
|
||||
# NOTE: -fgnu89-inline is needed on DJGPP 2.04 beta and GCC >= 4.3.0
|
||||
# because time.h uses GNU-style "extern inline".
|
||||
ALL_CFLAGS = -std=gnu99 -fgnu89-inline
|
||||
|
||||
ALL_CPPFLAGS = \
|
||||
-I. \
|
||||
-I../lib \
|
||||
-I../src/common \
|
||||
-I../src/liblzma/api \
|
||||
-I../src/liblzma/common \
|
||||
-I../src/liblzma/check \
|
||||
-I../src/liblzma/rangecoder \
|
||||
-I../src/liblzma/lz \
|
||||
-I../src/liblzma/lzma \
|
||||
-I../src/liblzma/delta \
|
||||
-I../src/liblzma/simple \
|
||||
-DHAVE_CONFIG_H
|
||||
|
||||
ALL_CPPFLAGS += $(CPPFLAGS)
|
||||
ALL_CFLAGS += $(CFLAGS)
|
||||
|
||||
.PHONY: all
|
||||
all: xz.exe
|
||||
|
||||
SRCS_C = \
|
||||
../lib/getopt.c \
|
||||
../lib/getopt1.c \
|
||||
../src/common/tuklib_cpucores.c \
|
||||
../src/common/tuklib_exit.c \
|
||||
../src/common/tuklib_mbstr_fw.c \
|
||||
../src/common/tuklib_mbstr_width.c \
|
||||
../src/common/tuklib_open_stdxxx.c \
|
||||
../src/common/tuklib_physmem.c \
|
||||
../src/common/tuklib_progname.c \
|
||||
../src/liblzma/check/check.c \
|
||||
../src/liblzma/check/crc32_table.c \
|
||||
../src/liblzma/check/crc64_table.c \
|
||||
../src/liblzma/check/sha256.c \
|
||||
../src/liblzma/common/alone_decoder.c \
|
||||
../src/liblzma/common/alone_encoder.c \
|
||||
../src/liblzma/common/block_decoder.c \
|
||||
../src/liblzma/common/block_encoder.c \
|
||||
../src/liblzma/common/block_header_decoder.c \
|
||||
../src/liblzma/common/block_header_encoder.c \
|
||||
../src/liblzma/common/block_util.c \
|
||||
../src/liblzma/common/common.c \
|
||||
../src/liblzma/common/filter_common.c \
|
||||
../src/liblzma/common/filter_decoder.c \
|
||||
../src/liblzma/common/filter_encoder.c \
|
||||
../src/liblzma/common/filter_flags_decoder.c \
|
||||
../src/liblzma/common/filter_flags_encoder.c \
|
||||
../src/liblzma/common/hardware_physmem.c \
|
||||
../src/liblzma/common/index.c \
|
||||
../src/liblzma/common/index_decoder.c \
|
||||
../src/liblzma/common/index_encoder.c \
|
||||
../src/liblzma/common/index_hash.c \
|
||||
../src/liblzma/common/stream_decoder.c \
|
||||
../src/liblzma/common/stream_encoder.c \
|
||||
../src/liblzma/common/stream_flags_common.c \
|
||||
../src/liblzma/common/stream_flags_decoder.c \
|
||||
../src/liblzma/common/stream_flags_encoder.c \
|
||||
../src/liblzma/common/vli_decoder.c \
|
||||
../src/liblzma/common/vli_encoder.c \
|
||||
../src/liblzma/common/vli_size.c \
|
||||
../src/liblzma/delta/delta_common.c \
|
||||
../src/liblzma/delta/delta_decoder.c \
|
||||
../src/liblzma/delta/delta_encoder.c \
|
||||
../src/liblzma/lz/lz_decoder.c \
|
||||
../src/liblzma/lz/lz_encoder.c \
|
||||
../src/liblzma/lz/lz_encoder_mf.c \
|
||||
../src/liblzma/lzma/fastpos_table.c \
|
||||
../src/liblzma/lzma/lzma2_decoder.c \
|
||||
../src/liblzma/lzma/lzma2_encoder.c \
|
||||
../src/liblzma/lzma/lzma_decoder.c \
|
||||
../src/liblzma/lzma/lzma_encoder.c \
|
||||
../src/liblzma/lzma/lzma_encoder_optimum_fast.c \
|
||||
../src/liblzma/lzma/lzma_encoder_optimum_normal.c \
|
||||
../src/liblzma/lzma/lzma_encoder_presets.c \
|
||||
../src/liblzma/rangecoder/price_table.c \
|
||||
../src/liblzma/simple/arm.c \
|
||||
../src/liblzma/simple/armthumb.c \
|
||||
../src/liblzma/simple/ia64.c \
|
||||
../src/liblzma/simple/powerpc.c \
|
||||
../src/liblzma/simple/simple_coder.c \
|
||||
../src/liblzma/simple/simple_decoder.c \
|
||||
../src/liblzma/simple/simple_encoder.c \
|
||||
../src/liblzma/simple/sparc.c \
|
||||
../src/liblzma/simple/x86.c \
|
||||
../src/xz/args.c \
|
||||
../src/xz/coder.c \
|
||||
../src/xz/file_io.c \
|
||||
../src/xz/hardware.c \
|
||||
../src/xz/list.c \
|
||||
../src/xz/main.c \
|
||||
../src/xz/message.c \
|
||||
../src/xz/options.c \
|
||||
../src/xz/signals.c \
|
||||
../src/xz/suffix.c \
|
||||
../src/xz/util.c
|
||||
SRCS_ASM = \
|
||||
../src/liblzma/check/crc32_x86.S \
|
||||
../src/liblzma/check/crc64_x86.S
|
||||
|
||||
OBJS_C = $(SRCS_C:.c=.o)
|
||||
OBJS_ASM = $(SRCS_ASM:.S=.o)
|
||||
OBJS = $(OBJS_C) $(OBJS_ASM)
|
||||
|
||||
getopt.h:
|
||||
update ../lib/getopt.in.h getopt.h
|
||||
|
||||
$(OBJS): getopt.h
|
||||
|
||||
$(OBJS_C): %.o: %.c
|
||||
$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $<
|
||||
|
||||
$(OBJS_ASM): %.o: %.S
|
||||
$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $<
|
||||
|
||||
# Make xz.exe not depend on an external DPMI server.
|
||||
xz.exe: $(OBJS)
|
||||
$(CC) $(ALL_CFLAGS) $(OBJS) $(LDFLAGS) -o $@
|
||||
$(STRIP) --strip-all $@
|
||||
exe2coff $@
|
||||
del $@
|
||||
copy /b $(DJGPP:DJGPP.ENV=BIN\CWSDSTUB.EXE) + $(@:.exe=) $@
|
||||
del $(@:.exe=)
|
||||
88
dos/README
Normal file
88
dos/README
Normal file
@@ -0,0 +1,88 @@
|
||||
|
||||
XZ Utils on DOS
|
||||
===============
|
||||
|
||||
Introduction
|
||||
|
||||
This document explains how to build XZ Utils for DOS using DJGPP.
|
||||
The resulting binaries should run at least on various DOS versions
|
||||
and under Windows 95/98/98SE/ME, although the Windows version of
|
||||
XZ Utils is recommended under Windows 95 and later.
|
||||
|
||||
This is currently experimental and has got very little testing.
|
||||
|
||||
Note: Makefile and config.h are updated only now and then. This
|
||||
means that especially if you checked out a development version,
|
||||
building for DOS probably won't work without updating Makefile
|
||||
and config.h first.
|
||||
|
||||
|
||||
Getting and Installing DJGPP
|
||||
|
||||
You may use <http://www.delorie.com/djgpp/zip-picker.html> to help
|
||||
deciding what to download, but as of writing (2010-10-09) that may
|
||||
not be the most convenient way taking into account what components
|
||||
are actually required to build XZ Utils. However, using the
|
||||
zip-picker can still be worth doing to get nice short summary of
|
||||
installation instructions (they can be found from readme.1st too).
|
||||
|
||||
For a more manual method, first select a mirror from
|
||||
<http://www.delorie.com/djgpp/getting.html>. You need
|
||||
the following files:
|
||||
|
||||
unzip32.exe (if you don't already have a LFN-capable unzipper)
|
||||
beta/v2/djdev204.zip
|
||||
v2gnu/bnu219b.zip
|
||||
v2gnu/gcc444b.zip
|
||||
v2gnu/mak3791b.zip
|
||||
v2misc/csdpmi7b.zip
|
||||
|
||||
If newer versions are available, probably you should try them first.
|
||||
Note that djdev203.zip is too old to build XZ Utils; you need at
|
||||
least djdev204.zip. Also note that you want csdpmi7b.zip even if you
|
||||
run under Windows or DOSEMU, because the XZ Utils Makefile will embed
|
||||
cwsdstub.exe to the resulting binaries.
|
||||
|
||||
See the instructions in readme.1st found from djdev204.zip. Here's
|
||||
a short summary, but you should still read readme.1st.
|
||||
|
||||
C:\> mkdir DJGPP
|
||||
C:\> cd DJGPP
|
||||
C:\DJGPP> c:\download\unzip32 c:\download\djdev204.zip
|
||||
C:\DJGPP> c:\download\unzip32 c:\download\bnu219b.zip
|
||||
C:\DJGPP> c:\download\unzip32 c:\download\gcc444b.zip
|
||||
C:\DJGPP> c:\download\unzip32 c:\download\mak3791b.zip
|
||||
C:\DJGPP> c:\download\unzip32 c:\download\csdpmi7b.zip
|
||||
|
||||
C:\DJGPP> set PATH=C:\DJGPP\BIN;%PATH%
|
||||
C:\DJGPP> set DJGPP=C:\DJGPP\DJGPP.ENV
|
||||
|
||||
You may want to add the last two lines into AUTOEXEC.BAT or have,
|
||||
for example, DJGPP.BAT which you can run before using DJGPP.
|
||||
|
||||
Make sure you use completely upper case path in the DJGPP environment
|
||||
variable. This is not required by DJGPP, but the XZ Utils Makefile is
|
||||
a bit stupid and expects that everything in DJGPP environment variable
|
||||
is uppercase.
|
||||
|
||||
|
||||
Building
|
||||
|
||||
You need to have an environment that supports long filenames (LFN).
|
||||
Once you have built XZ Utils, the resulting binaries can be run
|
||||
without long filename support.
|
||||
|
||||
Run "make" in this directory (the directory containing this README).
|
||||
You should get xz.exe (and a bunch of temporary files). Other tools
|
||||
are not built. Having e.g. xzdec.exe doesn't save much space compared
|
||||
to xz.exe, because the DJGPP runtime makes the .exe quite big anyway.
|
||||
|
||||
|
||||
Bugs
|
||||
|
||||
xz doesn't necessarily work in Dosbox. It should work in DOSEMU.
|
||||
|
||||
Pressing Ctrl-c or Ctrl-Break won't remove the incomplete target file
|
||||
when running under Windows XP Command Prompt (something goes wrong
|
||||
with SIGINT handling). It works correctly under Windows 95/98/98SE/ME.
|
||||
|
||||
130
dos/config.h
Normal file
130
dos/config.h
Normal file
@@ -0,0 +1,130 @@
|
||||
/* How many MiB of RAM to assume if the real amount cannot be determined. */
|
||||
#define ASSUME_RAM 32
|
||||
|
||||
/* Define to 1 if crc32 integrity check is enabled. */
|
||||
#define HAVE_CHECK_CRC32 1
|
||||
|
||||
/* Define to 1 if crc64 integrity check is enabled. */
|
||||
#define HAVE_CHECK_CRC64 1
|
||||
|
||||
/* Define to 1 if sha256 integrity check is enabled. */
|
||||
#define HAVE_CHECK_SHA256 1
|
||||
|
||||
/* Define to 1 if arm decoder is enabled. */
|
||||
#define HAVE_DECODER_ARM 1
|
||||
|
||||
/* Define to 1 if armthumb decoder is enabled. */
|
||||
#define HAVE_DECODER_ARMTHUMB 1
|
||||
|
||||
/* Define to 1 if delta decoder is enabled. */
|
||||
#define HAVE_DECODER_DELTA 1
|
||||
|
||||
/* Define to 1 if ia64 decoder is enabled. */
|
||||
#define HAVE_DECODER_IA64 1
|
||||
|
||||
/* Define to 1 if lzma1 decoder is enabled. */
|
||||
#define HAVE_DECODER_LZMA1 1
|
||||
|
||||
/* Define to 1 if lzma2 decoder is enabled. */
|
||||
#define HAVE_DECODER_LZMA2 1
|
||||
|
||||
/* Define to 1 if powerpc decoder is enabled. */
|
||||
#define HAVE_DECODER_POWERPC 1
|
||||
|
||||
/* Define to 1 if sparc decoder is enabled. */
|
||||
#define HAVE_DECODER_SPARC 1
|
||||
|
||||
/* Define to 1 if x86 decoder is enabled. */
|
||||
#define HAVE_DECODER_X86 1
|
||||
|
||||
/* Define to 1 if arm encoder is enabled. */
|
||||
#define HAVE_ENCODER_ARM 1
|
||||
|
||||
/* Define to 1 if armthumb encoder is enabled. */
|
||||
#define HAVE_ENCODER_ARMTHUMB 1
|
||||
|
||||
/* Define to 1 if delta encoder is enabled. */
|
||||
#define HAVE_ENCODER_DELTA 1
|
||||
|
||||
/* Define to 1 if ia64 encoder is enabled. */
|
||||
#define HAVE_ENCODER_IA64 1
|
||||
|
||||
/* Define to 1 if lzma1 encoder is enabled. */
|
||||
#define HAVE_ENCODER_LZMA1 1
|
||||
|
||||
/* Define to 1 if lzma2 encoder is enabled. */
|
||||
#define HAVE_ENCODER_LZMA2 1
|
||||
|
||||
/* Define to 1 if powerpc encoder is enabled. */
|
||||
#define HAVE_ENCODER_POWERPC 1
|
||||
|
||||
/* Define to 1 if sparc encoder is enabled. */
|
||||
#define HAVE_ENCODER_SPARC 1
|
||||
|
||||
/* Define to 1 if x86 encoder is enabled. */
|
||||
#define HAVE_ENCODER_X86 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define to 1 to enable bt2 match finder. */
|
||||
#define HAVE_MF_BT2 1
|
||||
|
||||
/* Define to 1 to enable bt3 match finder. */
|
||||
#define HAVE_MF_BT3 1
|
||||
|
||||
/* Define to 1 to enable bt4 match finder. */
|
||||
#define HAVE_MF_BT4 1
|
||||
|
||||
/* Define to 1 to enable hc3 match finder. */
|
||||
#define HAVE_MF_HC3 1
|
||||
|
||||
/* Define to 1 to enable hc4 match finder. */
|
||||
#define HAVE_MF_HC4 1
|
||||
|
||||
/* Define to 1 if stdbool.h conforms to C99. */
|
||||
#define HAVE_STDBOOL_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the `utimes' function. */
|
||||
#define HAVE_UTIMES 1
|
||||
|
||||
/* Define to 1 or 0, depending whether the compiler supports simple visibility
|
||||
declarations. */
|
||||
#define HAVE_VISIBILITY 0
|
||||
|
||||
/* Define to 1 if the system has the type `_Bool'. */
|
||||
#define HAVE__BOOL 1
|
||||
|
||||
/* Define to 1 to disable debugging code. */
|
||||
#define NDEBUG 1
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "lasse.collin@tukaani.org"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "XZ Utils"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL "http://tukaani.org/xz/"
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#define SIZEOF_SIZE_T 4
|
||||
|
||||
/* Define to 1 if the system supports fast unaligned access to 16-bit and
|
||||
32-bit integers. */
|
||||
#define TUKLIB_FAST_UNALIGNED_ACCESS 1
|
||||
115
extra/7z2lzma/7z2lzma.bash
Executable file
115
extra/7z2lzma/7z2lzma.bash
Executable file
@@ -0,0 +1,115 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
#############################################################################
|
||||
#
|
||||
# 7z2lzma.bash is very primitive .7z to .lzma converter. The input file must
|
||||
# have exactly one LZMA compressed stream, which has been created with the
|
||||
# default lc, lp, and pb values. The CRC32 in the .7z archive is not checked,
|
||||
# and the script may seem to succeed while it actually created a corrupt .lzma
|
||||
# file. You should always try uncompressing both the original .7z and the
|
||||
# created .lzma and compare that the output is identical.
|
||||
#
|
||||
# This script requires basic GNU tools and 7z or 7za tool from p7zip.
|
||||
#
|
||||
# Last modified: 2009-01-15 14:25+0200
|
||||
#
|
||||
#############################################################################
|
||||
#
|
||||
# Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
#
|
||||
# This file has been put into the public domain.
|
||||
# You can do whatever you want with this file.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
# You can use 7z or 7za, both will work.
|
||||
SEVENZIP=7za
|
||||
|
||||
if [ $# != 2 -o -z "$1" -o -z "$2" ]; then
|
||||
echo "Usage: $0 input.7z output.lzma"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Converts an integer variable to little endian binary integer.
|
||||
int2bin()
|
||||
{
|
||||
local LEN=$1
|
||||
local NUM=$2
|
||||
local HEX=(0 1 2 3 4 5 6 7 8 9 A B C D E F)
|
||||
local I
|
||||
for ((I=0; I < "$LEN"; ++I)); do
|
||||
printf "\\x${HEX[(NUM >> 4) & 0x0F]}${HEX[NUM & 0x0F]}"
|
||||
NUM=$((NUM >> 8))
|
||||
done
|
||||
}
|
||||
|
||||
# Make sure we get possible errors from pipes.
|
||||
set -o pipefail
|
||||
|
||||
# Get information about the input file. At least older 7z and 7za versions
|
||||
# may return with zero exit status even when an error occurred, so check
|
||||
# if the output has any lines beginning with "Error".
|
||||
INFO=$("$SEVENZIP" l -slt "$1")
|
||||
if [ $? != 0 ] || printf '%s\n' "$INFO" | grep -q ^Error; then
|
||||
printf '%s\n' "$INFO"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if the input file has more than one compressed block.
|
||||
if printf '%s\n' "$INFO" | grep -q '^Block = 1'; then
|
||||
echo "Cannot convert, because the input file has more than"
|
||||
echo "one compressed block."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get compressed, uncompressed, and dictionary size.
|
||||
CSIZE=$(printf '%s\n' "$INFO" | sed -rn 's|^Packed Size = ([0-9]+$)|\1|p')
|
||||
USIZE=$(printf '%s\n' "$INFO" | sed -rn 's|^Size = ([0-9]+$)|\1|p')
|
||||
DICT=$(printf '%s\n' "$INFO" | sed -rn 's|^Method = LZMA:([0-9]+[bkm]?)$|\1|p')
|
||||
|
||||
if [ -z "$CSIZE" -o -z "$USIZE" -o -z "$DICT" ]; then
|
||||
echo "Parsing output of $SEVENZIP failed. Maybe the file uses some"
|
||||
echo "other compression method than plain LZMA."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# The following assumes that the default lc, lp, and pb settings were used.
|
||||
# Otherwise the output will be corrupt.
|
||||
printf '\x5D' > "$2"
|
||||
|
||||
# Dictionary size can be either was power of two, bytes, kibibytes, or
|
||||
# mebibytes. We need to convert it to bytes.
|
||||
case $DICT in
|
||||
*b)
|
||||
DICT=${DICT%b}
|
||||
;;
|
||||
*k)
|
||||
DICT=${DICT%k}
|
||||
DICT=$((DICT << 10))
|
||||
;;
|
||||
*m)
|
||||
DICT=${DICT%m}
|
||||
DICT=$((DICT << 20))
|
||||
;;
|
||||
*)
|
||||
DICT=$((1 << DICT))
|
||||
;;
|
||||
esac
|
||||
int2bin 4 "$DICT" >> "$2"
|
||||
|
||||
# Uncompressed size
|
||||
int2bin 8 "$USIZE" >> "$2"
|
||||
|
||||
# Copy the actual compressed data. Using multiple dd commands to avoid
|
||||
# copying large amount of data with one-byte block size, which would be
|
||||
# annoyingly slow.
|
||||
BS=8192
|
||||
BIGSIZE=$((CSIZE / BS))
|
||||
CSIZE=$((CSIZE % BS))
|
||||
{
|
||||
dd of=/dev/null bs=32 count=1 \
|
||||
&& dd bs="$BS" count="$BIGSIZE" \
|
||||
&& dd bs=1 count="$CSIZE"
|
||||
} < "$1" >> "$2"
|
||||
|
||||
exit $?
|
||||
@@ -64,11 +64,11 @@ int main(int argc, char *argv[]) {
|
||||
ret = fread(buf, BUFSIZE, 1, stdin);
|
||||
if (ret != 1)
|
||||
break;
|
||||
|
||||
|
||||
/* Scan for signature. */
|
||||
for (i = 0; i<BUFSIZE-23; i++) {
|
||||
if (find_lzma_header(buf+i) && numlzma-- <= 0) {
|
||||
fwrite(buf+i, (BUFSIZE-i), 1, stdout);
|
||||
fwrite(buf+i, (BUFSIZE-i), 1, stdout);
|
||||
for (;;) {
|
||||
int ch;
|
||||
ch = getchar();
|
||||
@@ -76,7 +76,6 @@ int main(int argc, char *argv[]) {
|
||||
exit(0);
|
||||
putchar(ch);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
blocks++;
|
||||
|
||||
@@ -1,40 +1,32 @@
|
||||
##
|
||||
## Copyright (C) 2004-2007 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2007 Lasse Collin
|
||||
## Copyright (C) 2004-2007 Free Software Foundation, Inc.
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 2 of the License, or
|
||||
## (at your option) any later version.
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 2 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
|
||||
## Not using gnulib-tool, at least for now. Less mess this way.
|
||||
## Not using gnulib-tool, at least for now. It is likely that we won't
|
||||
## need anything else from Gnulib than getopt_long().
|
||||
|
||||
## We need two builds of libgnu: one with NLS and one without.
|
||||
## This is because lzma uses NLS but lzmadec doesn't, while
|
||||
## both need GNU getopt_long().
|
||||
noinst_LIBRARIES = libgnu.a libgnu_nls.a
|
||||
noinst_LIBRARIES = libgnu.a
|
||||
|
||||
libgnu_a_SOURCES =
|
||||
libgnu_a_DEPENDENCIES = $(LIBOBJS)
|
||||
libgnu_a_LIBADD = $(LIBOBJS)
|
||||
libgnu_a_CPPFLAGS = -DDISABLE_NLS=1
|
||||
|
||||
libgnu_nls_a_SOURCES =
|
||||
libgnu_nls_a_DEPENDENCIES = $(LIBOBJS)
|
||||
libgnu_nls_a_LIBADD = $(LIBOBJS)
|
||||
|
||||
EXTRA_DIST = gettext.h getopt_.h getopt.c getopt1.c getopt_int.h
|
||||
EXTRA_DIST = getopt.in.h getopt.c getopt1.c getopt_int.h
|
||||
BUILT_SOURCES = $(GETOPT_H)
|
||||
MOSTLYCLEANFILES = getopt.h getopt.h-t
|
||||
|
||||
getopt.h: getopt_.h
|
||||
getopt.h: getopt.in.h
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
||||
cat $(srcdir)/getopt_.h; \
|
||||
cat $(srcdir)/getopt.in.h; \
|
||||
} > $@-t
|
||||
mv -f $@-t $@
|
||||
|
||||
14
lib/getopt.c
14
lib/getopt.c
@@ -7,16 +7,16 @@
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
@@ -35,12 +35,18 @@
|
||||
# include <unixlib.h>
|
||||
#endif
|
||||
|
||||
/* Completely disable NLS for getopt. We won't include translations for it
|
||||
anyway. If the system lacks getopt_long, missing translations probably
|
||||
aren't a problem. */
|
||||
/*
|
||||
#ifdef _LIBC
|
||||
# include <libintl.h>
|
||||
#else
|
||||
# include "gettext.h"
|
||||
# define _(msgid) gettext (msgid)
|
||||
#endif
|
||||
*/
|
||||
#define _(msgid) (msgid)
|
||||
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
|
||||
240
lib/gettext.h
240
lib/gettext.h
@@ -1,240 +0,0 @@
|
||||
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||
Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _LIBGETTEXT_H
|
||||
#define _LIBGETTEXT_H 1
|
||||
|
||||
/* NLS can be disabled through the configure --disable-nls option.
|
||||
*
|
||||
* Extra hack in LZMA Utils: if DISABLE_NLS is defined, NLS is disabled
|
||||
* even if ENABLE_NLS is true. See Makefile.am for more information.
|
||||
*/
|
||||
#if ENABLE_NLS && !defined(DISABLE_NLS)
|
||||
|
||||
/* Get declarations of GNU message catalog functions. */
|
||||
# include <libintl.h>
|
||||
|
||||
/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
|
||||
the gettext() and ngettext() macros. This is an alternative to calling
|
||||
textdomain(), and is useful for libraries. */
|
||||
# ifdef DEFAULT_TEXT_DOMAIN
|
||||
# undef gettext
|
||||
# define gettext(Msgid) \
|
||||
dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
|
||||
# undef ngettext
|
||||
# define ngettext(Msgid1, Msgid2, N) \
|
||||
dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
|
||||
# endif
|
||||
|
||||
#else
|
||||
|
||||
/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
|
||||
chokes if dcgettext is defined as a macro. So include it now, to make
|
||||
later inclusions of <locale.h> a NOP. We don't include <libintl.h>
|
||||
as well because people using "gettext.h" will not include <libintl.h>,
|
||||
and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
|
||||
is OK. */
|
||||
#if defined(__sun)
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
|
||||
<libintl.h>, which chokes if dcgettext is defined as a macro. So include
|
||||
it now, to make later inclusions of <libintl.h> a NOP. */
|
||||
#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
|
||||
# include <cstdlib>
|
||||
# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
|
||||
# include <libintl.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Disabled NLS.
|
||||
The casts to 'const char *' serve the purpose of producing warnings
|
||||
for invalid uses of the value returned from these functions.
|
||||
On pre-ANSI systems without 'const', the config.h file is supposed to
|
||||
contain "#define const". */
|
||||
# define gettext(Msgid) ((const char *) (Msgid))
|
||||
# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
|
||||
# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
|
||||
# define ngettext(Msgid1, Msgid2, N) \
|
||||
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||
# define dngettext(Domainname, Msgid1, Msgid2, N) \
|
||||
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
|
||||
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||
# define textdomain(Domainname) ((const char *) (Domainname))
|
||||
# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
|
||||
# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
|
||||
|
||||
#endif
|
||||
|
||||
/* A pseudo function call that serves as a marker for the automated
|
||||
extraction of messages, but does not call gettext(). The run-time
|
||||
translation is done at a different place in the code.
|
||||
The argument, String, should be a literal string. Concatenated strings
|
||||
and other string expressions won't work.
|
||||
The macro's expansion is not parenthesized, so that it is suitable as
|
||||
initializer for static 'char[]' or 'const char[]' variables. */
|
||||
#define gettext_noop(String) String
|
||||
|
||||
/* The separator between msgctxt and msgid in a .mo file. */
|
||||
#define GETTEXT_CONTEXT_GLUE "\004"
|
||||
|
||||
/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
|
||||
MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be
|
||||
short and rarely need to change.
|
||||
The letter 'p' stands for 'particular' or 'special'. */
|
||||
#ifdef DEFAULT_TEXT_DOMAIN
|
||||
# define pgettext(Msgctxt, Msgid) \
|
||||
pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
|
||||
#else
|
||||
# define pgettext(Msgctxt, Msgid) \
|
||||
pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
|
||||
#endif
|
||||
#define dpgettext(Domainname, Msgctxt, Msgid) \
|
||||
pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
|
||||
#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
|
||||
pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category)
|
||||
#ifdef DEFAULT_TEXT_DOMAIN
|
||||
# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
|
||||
npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
|
||||
#else
|
||||
# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
|
||||
npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
|
||||
#endif
|
||||
#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
|
||||
npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
|
||||
#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
|
||||
npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
|
||||
|
||||
static inline const char *
|
||||
pgettext_aux (const char *domain,
|
||||
const char *msg_ctxt_id, const char *msgid,
|
||||
int category)
|
||||
{
|
||||
const char *translation = dcgettext (domain, msg_ctxt_id, category);
|
||||
if (translation == msg_ctxt_id)
|
||||
return msgid;
|
||||
else
|
||||
return translation;
|
||||
}
|
||||
|
||||
static inline const char *
|
||||
npgettext_aux (const char *domain,
|
||||
const char *msg_ctxt_id, const char *msgid,
|
||||
const char *msgid_plural, unsigned long int n,
|
||||
int category)
|
||||
{
|
||||
const char *translation =
|
||||
dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
|
||||
if (translation == msg_ctxt_id || translation == msgid_plural)
|
||||
return (n == 1 ? msgid : msgid_plural);
|
||||
else
|
||||
return translation;
|
||||
}
|
||||
|
||||
/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID
|
||||
can be arbitrary expressions. But for string literals these macros are
|
||||
less efficient than those above. */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
|
||||
|
||||
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#define pgettext_expr(Msgctxt, Msgid) \
|
||||
dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
|
||||
#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
|
||||
dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
|
||||
|
||||
static inline const char *
|
||||
dcpgettext_expr (const char *domain,
|
||||
const char *msgctxt, const char *msgid,
|
||||
int category)
|
||||
{
|
||||
size_t msgctxt_len = strlen (msgctxt) + 1;
|
||||
size_t msgid_len = strlen (msgid) + 1;
|
||||
const char *translation;
|
||||
#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
|
||||
char msg_ctxt_id[msgctxt_len + msgid_len];
|
||||
#else
|
||||
char buf[1024];
|
||||
char *msg_ctxt_id =
|
||||
(msgctxt_len + msgid_len <= sizeof (buf)
|
||||
? buf
|
||||
: (char *) malloc (msgctxt_len + msgid_len));
|
||||
if (msg_ctxt_id != NULL)
|
||||
#endif
|
||||
{
|
||||
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
|
||||
msg_ctxt_id[msgctxt_len - 1] = '\004';
|
||||
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
|
||||
translation = dcgettext (domain, msg_ctxt_id, category);
|
||||
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
|
||||
if (msg_ctxt_id != buf)
|
||||
free (msg_ctxt_id);
|
||||
#endif
|
||||
if (translation != msg_ctxt_id)
|
||||
return translation;
|
||||
}
|
||||
return msgid;
|
||||
}
|
||||
|
||||
#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
|
||||
dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
|
||||
#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
|
||||
dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
|
||||
|
||||
static inline const char *
|
||||
dcnpgettext_expr (const char *domain,
|
||||
const char *msgctxt, const char *msgid,
|
||||
const char *msgid_plural, unsigned long int n,
|
||||
int category)
|
||||
{
|
||||
size_t msgctxt_len = strlen (msgctxt) + 1;
|
||||
size_t msgid_len = strlen (msgid) + 1;
|
||||
const char *translation;
|
||||
#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
|
||||
char msg_ctxt_id[msgctxt_len + msgid_len];
|
||||
#else
|
||||
char buf[1024];
|
||||
char *msg_ctxt_id =
|
||||
(msgctxt_len + msgid_len <= sizeof (buf)
|
||||
? buf
|
||||
: (char *) malloc (msgctxt_len + msgid_len));
|
||||
if (msg_ctxt_id != NULL)
|
||||
#endif
|
||||
{
|
||||
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
|
||||
msg_ctxt_id[msgctxt_len - 1] = '\004';
|
||||
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
|
||||
translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
|
||||
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
|
||||
if (msg_ctxt_id != buf)
|
||||
free (msg_ctxt_id);
|
||||
#endif
|
||||
if (!(translation == msg_ctxt_id || translation == msgid_plural))
|
||||
return translation;
|
||||
}
|
||||
return (n == 1 ? msgid : msgid_plural);
|
||||
}
|
||||
|
||||
#endif /* _LIBGETTEXT_H */
|
||||
35
m4/.gitignore
vendored
Normal file
35
m4/.gitignore
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
codeset.m4
|
||||
gettext.m4
|
||||
glibc2.m4
|
||||
glibc21.m4
|
||||
iconv.m4
|
||||
intdiv0.m4
|
||||
intl.m4
|
||||
intldir.m4
|
||||
intmax.m4
|
||||
inttypes-pri.m4
|
||||
inttypes_h.m4
|
||||
lcmessage.m4
|
||||
lib-ld.m4
|
||||
lib-link.m4
|
||||
lib-prefix.m4
|
||||
libtool.m4
|
||||
lock.m4
|
||||
longdouble.m4
|
||||
longlong.m4
|
||||
ltoptions.m4
|
||||
ltsugar.m4
|
||||
ltversion.m4
|
||||
lt~obsolete.m4
|
||||
nls.m4
|
||||
po.m4
|
||||
printf-posix.m4
|
||||
progtest.m4
|
||||
size_max.m4
|
||||
stdint_h.m4
|
||||
uintmax_t.m4
|
||||
ulonglong.m4
|
||||
visibility.m4
|
||||
wchar_t.m4
|
||||
wint_t.m4
|
||||
xsize.m4
|
||||
62
m4/getopt.m4
62
m4/getopt.m4
@@ -1,5 +1,5 @@
|
||||
# getopt.m4 serial 13
|
||||
dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
# getopt.m4 serial 14 (modified version)
|
||||
dnl Copyright (C) 2002-2006, 2008 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
@@ -13,7 +13,6 @@ AC_DEFUN([gl_GETOPT_SUBSTITUTE],
|
||||
AC_LIBOBJ([getopt])
|
||||
AC_LIBOBJ([getopt1])
|
||||
gl_GETOPT_SUBSTITUTE_HEADER
|
||||
gl_PREREQ_GETOPT
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
|
||||
@@ -32,40 +31,35 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
|
||||
fi
|
||||
|
||||
if test -z "$GETOPT_H"; then
|
||||
AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h])
|
||||
AC_CHECK_FUNCS([getopt_long], [], [GETOPT_H=getopt.h])
|
||||
fi
|
||||
|
||||
dnl BSD getopt_long uses an incompatible method to reset option processing,
|
||||
dnl and (as of 2004-10-15) mishandles optional option-arguments.
|
||||
dnl BSD getopt_long uses a way to reset option processing, that is different
|
||||
dnl from GNU and Solaris (which copied the GNU behavior). We support both
|
||||
dnl GNU and BSD style resetting of getopt_long(), so there's no need to use
|
||||
dnl GNU getopt_long() on BSD due to different resetting style.
|
||||
dnl
|
||||
dnl With getopt_long(), some BSD versions have a bug in handling optional
|
||||
dnl arguments. This bug appears only if the environment variable
|
||||
dnl POSIXLY_CORRECT has been set, so it shouldn't be too bad in most
|
||||
dnl cases; probably most don't have that variable set. But if we actually
|
||||
dnl hit this bug, it is a real problem due to our heavy use of optional
|
||||
dnl arguments.
|
||||
dnl
|
||||
dnl According to CVS logs, the bug was introduced in OpenBSD in 2003-09-22
|
||||
dnl and copied to FreeBSD in 2004-02-24. It was fixed in both in 2006-09-22,
|
||||
dnl so the affected versions shouldn't be popular anymore anyway. NetBSD
|
||||
dnl never had this bug. TODO: What about Darwin and others?
|
||||
if test -z "$GETOPT_H"; then
|
||||
AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>])
|
||||
AC_CHECK_DECL([optreset],
|
||||
[AC_DEFINE([HAVE_OPTRESET], 1,
|
||||
[Define to 1 if getopt.h declares extern int optreset.])],
|
||||
[], [#include <getopt.h>])
|
||||
fi
|
||||
|
||||
dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
|
||||
dnl option string (as of 2005-05-05).
|
||||
if test -z "$GETOPT_H"; then
|
||||
AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_gnu_getopt],
|
||||
[AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <getopt.h>],
|
||||
[[
|
||||
char *myargv[3];
|
||||
myargv[0] = "conftest";
|
||||
myargv[1] = "-+";
|
||||
myargv[2] = 0;
|
||||
return getopt (2, myargv, "+a") != '?';
|
||||
]])],
|
||||
[gl_cv_func_gnu_getopt=yes],
|
||||
[gl_cv_func_gnu_getopt=no],
|
||||
[dnl cross compiling - pessimistically guess based on decls
|
||||
dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
|
||||
dnl option string (as of 2005-05-05).
|
||||
AC_CHECK_DECL([getopt_clip],
|
||||
[gl_cv_func_gnu_getopt=no], [gl_cv_func_gnu_getopt=yes],
|
||||
[#include <getopt.h>])])])
|
||||
if test "$gl_cv_func_gnu_getopt" = "no"; then
|
||||
GETOPT_H=getopt.h
|
||||
fi
|
||||
fi
|
||||
dnl option string (as of 2005-05-05). We don't use that feature, so this
|
||||
dnl is not a problem for us. Thus, the respective test was removed here.
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_GETOPT_IFELSE],
|
||||
@@ -75,9 +69,3 @@ AC_DEFUN([gl_GETOPT_IFELSE],
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_GETOPT], [gl_GETOPT_IFELSE([gl_GETOPT_SUBSTITUTE])])
|
||||
|
||||
# Prerequisites of lib/getopt*.
|
||||
AC_DEFUN([gl_PREREQ_GETOPT],
|
||||
[
|
||||
AC_CHECK_DECLS_ONCE([getenv])
|
||||
])
|
||||
|
||||
63
m4/posix-shell.m4
Normal file
63
m4/posix-shell.m4
Normal file
@@ -0,0 +1,63 @@
|
||||
# Find a POSIX-conforming shell.
|
||||
|
||||
# Copyright (C) 2007-2008 Free Software Foundation, Inc.
|
||||
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# Written by Paul Eggert.
|
||||
|
||||
# If a POSIX-conforming shell can be found, set POSIX_SHELL and
|
||||
# PREFERABLY_POSIX_SHELL to it. If not, set POSIX_SHELL to the
|
||||
# empty string and PREFERABLY_POSIX_SHELL to '/bin/sh'.
|
||||
|
||||
AC_DEFUN([gl_POSIX_SHELL],
|
||||
[
|
||||
AC_CACHE_CHECK([for a shell that conforms to POSIX], [gl_cv_posix_shell],
|
||||
[gl_test_posix_shell_script='
|
||||
func_return () {
|
||||
(exit [$]1)
|
||||
}
|
||||
func_success () {
|
||||
func_return 0
|
||||
}
|
||||
func_failure () {
|
||||
func_return 1
|
||||
}
|
||||
func_ret_success () {
|
||||
return 0
|
||||
}
|
||||
func_ret_failure () {
|
||||
return 1
|
||||
}
|
||||
subshell_umask_sanity () {
|
||||
(umask 22; (umask 0); test $(umask) -eq 22)
|
||||
}
|
||||
test "[$](echo foo)" = foo &&
|
||||
func_success &&
|
||||
! func_failure &&
|
||||
func_ret_success &&
|
||||
! func_ret_failure &&
|
||||
(set x && func_ret_success y && test x = "[$]1") &&
|
||||
subshell_umask_sanity
|
||||
'
|
||||
for gl_cv_posix_shell in \
|
||||
"$CONFIG_SHELL" "$SHELL" /bin/sh /bin/bash /bin/ksh /bin/sh5 no; do
|
||||
case $gl_cv_posix_shell in
|
||||
/*)
|
||||
"$gl_cv_posix_shell" -c "$gl_test_posix_shell_script" 2>/dev/null \
|
||||
&& break;;
|
||||
esac
|
||||
done])
|
||||
|
||||
if test "$gl_cv_posix_shell" != no; then
|
||||
POSIX_SHELL=$gl_cv_posix_shell
|
||||
PREFERABLY_POSIX_SHELL=$POSIX_SHELL
|
||||
else
|
||||
POSIX_SHELL=
|
||||
PREFERABLY_POSIX_SHELL=/bin/sh
|
||||
fi
|
||||
AC_SUBST([POSIX_SHELL])
|
||||
AC_SUBST([PREFERABLY_POSIX_SHELL])
|
||||
])
|
||||
22
m4/tuklib_common.m4
Normal file
22
m4/tuklib_common.m4
Normal file
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# TUKLIB_COMMON
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Common checks for tuklib.
|
||||
#
|
||||
# COPYING
|
||||
#
|
||||
# Author: Lasse Collin
|
||||
#
|
||||
# This file has been put into the public domain.
|
||||
# You can do whatever you want with this file.
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([TUKLIB_COMMON], [
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_PROG_CC_C99])
|
||||
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
|
||||
])dnl
|
||||
105
m4/tuklib_cpucores.m4
Normal file
105
m4/tuklib_cpucores.m4
Normal file
@@ -0,0 +1,105 @@
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# TUKLIB_CPUCORES
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check how to find out the number of available CPU cores in the system.
|
||||
# This information is used by tuklib_cpucores.c.
|
||||
#
|
||||
# Supported methods:
|
||||
# - sysctl(): BSDs, OS/2
|
||||
# - sysconf(): GNU/Linux, Solaris, Tru64, IRIX, AIX, Cygwin
|
||||
# - pstat_getdynamic(): HP-UX
|
||||
#
|
||||
# COPYING
|
||||
#
|
||||
# Author: Lasse Collin
|
||||
#
|
||||
# This file has been put into the public domain.
|
||||
# You can do whatever you want with this file.
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([TUKLIB_CPUCORES], [
|
||||
AC_REQUIRE([TUKLIB_COMMON])
|
||||
|
||||
# sys/param.h might be needed by sys/sysctl.h.
|
||||
AC_CHECK_HEADERS([sys/param.h])
|
||||
|
||||
AC_CACHE_CHECK([how to detect the number of available CPU cores],
|
||||
[tuklib_cv_cpucores_method], [
|
||||
|
||||
# Look for sysctl() solution first, because on OS/2, both sysconf()
|
||||
# and sysctl() pass the tests in this file, but only sysctl()
|
||||
# actually works.
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
#include <sys/sysctl.h>
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
int name[2] = { CTL_HW, HW_NCPU };
|
||||
int cpus;
|
||||
size_t cpus_size = sizeof(cpus);
|
||||
sysctl(name, 2, &cpus, &cpus_size, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
]])], [tuklib_cv_cpucores_method=sysctl], [
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <unistd.h>
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
long i;
|
||||
#ifdef _SC_NPROCESSORS_ONLN
|
||||
/* Many systems using sysconf() */
|
||||
i = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
#else
|
||||
/* IRIX */
|
||||
i = sysconf(_SC_NPROC_ONLN);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
]])], [tuklib_cv_cpucores_method=sysconf], [
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <sys/param.h>
|
||||
#include <sys/pstat.h>
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
struct pst_dynamic pst;
|
||||
pstat_getdynamic(&pst, sizeof(pst), 1, 0);
|
||||
(void)pst.psd_proc_cnt;
|
||||
return 0;
|
||||
}
|
||||
]])], [tuklib_cv_cpucores_method=pstat_getdynamic], [
|
||||
|
||||
tuklib_cv_cpucores_method=unknown
|
||||
])])])])
|
||||
|
||||
case $tuklib_cv_cpucores_method in
|
||||
sysctl)
|
||||
AC_DEFINE([TUKLIB_CPUCORES_SYSCTL], [1],
|
||||
[Define to 1 if the number of available CPU cores
|
||||
can be detected with sysctl().])
|
||||
;;
|
||||
sysconf)
|
||||
AC_DEFINE([TUKLIB_CPUCORES_SYSCONF], [1],
|
||||
[Define to 1 if the number of available CPU cores
|
||||
can be detected with sysconf(_SC_NPROCESSORS_ONLN)
|
||||
or sysconf(_SC_NPROC_ONLN).])
|
||||
;;
|
||||
pstat_getdynamic)
|
||||
AC_DEFINE([TUKLIB_CPUCORES_PSTAT_GETDYNAMIC], [1],
|
||||
[Define to 1 if the number of available CPU cores
|
||||
can be detected with pstat_getdynamic().])
|
||||
;;
|
||||
esac
|
||||
])dnl
|
||||
74
m4/tuklib_integer.m4
Normal file
74
m4/tuklib_integer.m4
Normal file
@@ -0,0 +1,74 @@
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# TUKLIB_INTEGER
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Checks for tuklib_integer.h:
|
||||
# - Endianness
|
||||
# - Does operating system provide byte swapping macros
|
||||
# - Does the hardware support fast unaligned access to 16-bit
|
||||
# and 32-bit integers
|
||||
#
|
||||
# COPYING
|
||||
#
|
||||
# Author: Lasse Collin
|
||||
#
|
||||
# This file has been put into the public domain.
|
||||
# You can do whatever you want with this file.
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([TUKLIB_INTEGER], [
|
||||
AC_REQUIRE([TUKLIB_COMMON])
|
||||
AC_REQUIRE([AC_C_BIGENDIAN])
|
||||
AC_CHECK_HEADERS([byteswap.h sys/endian.h sys/byteorder.h], [break])
|
||||
|
||||
# Even if we have byteswap.h, we may lack the specific macros/functions.
|
||||
if test x$ac_cv_header_byteswap_h = xyes ; then
|
||||
m4_foreach([FUNC], [bswap_16,bswap_32,bswap_64], [
|
||||
AC_MSG_CHECKING([if FUNC is available])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||
#include <byteswap.h>
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
FUNC[](42);
|
||||
return 0;
|
||||
}
|
||||
])], [
|
||||
AC_DEFINE(HAVE_[]m4_toupper(FUNC), [1],
|
||||
[Define to 1 if] FUNC [is available.])
|
||||
AC_MSG_RESULT([yes])
|
||||
], [AC_MSG_RESULT([no])])
|
||||
|
||||
])dnl
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if unaligned memory access should be used])
|
||||
AC_ARG_ENABLE([unaligned-access], AC_HELP_STRING([--enable-unaligned-access],
|
||||
[Enable if the system supports *fast* unaligned memory access
|
||||
with 16-bit and 32-bit integers. By default, this is enabled
|
||||
only on x86, x86_64, and big endian PowerPC.]),
|
||||
[], [enable_unaligned_access=auto])
|
||||
if test "x$enable_unaligned_access" = xauto ; then
|
||||
# TODO: There may be other architectures, on which unaligned access
|
||||
# is OK.
|
||||
case $host_cpu in
|
||||
i?86|x86_64|powerpc|powerpc64)
|
||||
enable_unaligned_access=yes
|
||||
;;
|
||||
*)
|
||||
enable_unaligned_access=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test "x$enable_unaligned_access" = xyes ; then
|
||||
AC_DEFINE([TUKLIB_FAST_UNALIGNED_ACCESS], [1], [Define to 1 if
|
||||
the system supports fast unaligned access to 16-bit and
|
||||
32-bit integers.])
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
])dnl
|
||||
30
m4/tuklib_mbstr.m4
Normal file
30
m4/tuklib_mbstr.m4
Normal file
@@ -0,0 +1,30 @@
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# TUKLIB_MBSTR
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check if multibyte and wide character functionality is available
|
||||
# for use by tuklib_mbstr_* functions. If not enough multibyte string
|
||||
# support is available in the C library, the functions keep working
|
||||
# with the assumption that all strings are a in single-byte character
|
||||
# set without combining characters, e.g. US-ASCII or ISO-8859-*.
|
||||
#
|
||||
# This .m4 file and tuklib_mbstr.h are common to all tuklib_mbstr_*
|
||||
# functions, but each function is put into a separate .c file so
|
||||
# that it is possible to pick only what is strictly needed.
|
||||
#
|
||||
# COPYING
|
||||
#
|
||||
# Author: Lasse Collin
|
||||
#
|
||||
# This file has been put into the public domain.
|
||||
# You can do whatever you want with this file.
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([TUKLIB_MBSTR], [
|
||||
AC_REQUIRE([TUKLIB_COMMON])
|
||||
AC_FUNC_MBRTOWC
|
||||
AC_CHECK_FUNCS([wcwidth])
|
||||
])dnl
|
||||
211
m4/tuklib_physmem.m4
Normal file
211
m4/tuklib_physmem.m4
Normal file
@@ -0,0 +1,211 @@
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# TUKLIB_PHYSMEM
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check how to get the amount of physical memory.
|
||||
# This information is used in tuklib_physmem.c.
|
||||
#
|
||||
# Supported methods:
|
||||
#
|
||||
# - Windows (including Cygwin), OS/2, DJGPP (DOS), and OpenVMS have
|
||||
# operating-system specific functions.
|
||||
#
|
||||
# - AIX has _system_configuration.physmem.
|
||||
#
|
||||
# - sysconf() works on GNU/Linux and Solaris, and possibly on
|
||||
# some BSDs.
|
||||
#
|
||||
# - BSDs use sysctl().
|
||||
#
|
||||
# - Tru64 uses getsysinfo().
|
||||
#
|
||||
# - HP-UX uses pstat_getstatic().
|
||||
#
|
||||
# - IRIX has setinvent_r(), getinvent_r(), and endinvent_r().
|
||||
#
|
||||
# - sysinfo() works on Linux/dietlibc and probably on other Linux
|
||||
# systems whose libc may lack sysconf().
|
||||
#
|
||||
# COPYING
|
||||
#
|
||||
# Author: Lasse Collin
|
||||
#
|
||||
# This file has been put into the public domain.
|
||||
# You can do whatever you want with this file.
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([TUKLIB_PHYSMEM], [
|
||||
AC_REQUIRE([TUKLIB_COMMON])
|
||||
|
||||
# sys/param.h might be needed by sys/sysctl.h.
|
||||
AC_CHECK_HEADERS([sys/param.h])
|
||||
|
||||
AC_CACHE_CHECK([how to detect the amount of physical memory],
|
||||
[tuklib_cv_physmem_method], [
|
||||
|
||||
# Maybe checking $host_os would be enough but this matches what
|
||||
# tuklib_physmem.c does.
|
||||
#
|
||||
# NOTE: IRIX has a compiler that doesn't error out with #error, so use
|
||||
# a non-compilable text instead of #error to generate an error.
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#if defined(_WIN32) || defined(__CYGWIN__) || defined(__OS2__) \
|
||||
|| defined(__DJGPP__) || defined(__VMS)
|
||||
int main(void) { return 0; }
|
||||
#else
|
||||
compile error
|
||||
#endif
|
||||
]])], [tuklib_cv_physmem_method=special], [
|
||||
|
||||
# Look for AIX-specific solution before sysconf(), because the test
|
||||
# for sysconf() will pass on AIX but won't actually work
|
||||
# (sysconf(_SC_PHYS_PAGES) compiles but always returns -1 on AIX).
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
(void)_system_configuration.physmem;
|
||||
return 0;
|
||||
}
|
||||
]])], [tuklib_cv_physmem_method=aix], [
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <unistd.h>
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
long i;
|
||||
i = sysconf(_SC_PAGESIZE);
|
||||
i = sysconf(_SC_PHYS_PAGES);
|
||||
return 0;
|
||||
}
|
||||
]])], [tuklib_cv_physmem_method=sysconf], [
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
#include <sys/sysctl.h>
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
int name[2] = { CTL_HW, HW_PHYSMEM };
|
||||
unsigned long mem;
|
||||
size_t mem_ptr_size = sizeof(mem);
|
||||
sysctl(name, 2, &mem, &mem_ptr_size, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
]])], [tuklib_cv_physmem_method=sysctl], [
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <sys/sysinfo.h>
|
||||
#include <machine/hal_sysinfo.h>
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
int memkb;
|
||||
int start = 0;
|
||||
getsysinfo(GSI_PHYSMEM, (caddr_t)&memkb, sizeof(memkb), &start);
|
||||
return 0;
|
||||
}
|
||||
]])], [tuklib_cv_physmem_method=getsysinfo],[
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <sys/param.h>
|
||||
#include <sys/pstat.h>
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
struct pst_static pst;
|
||||
pstat_getstatic(&pst, sizeof(pst), 1, 0);
|
||||
(void)pst.physical_memory;
|
||||
(void)pst.page_size;
|
||||
return 0;
|
||||
}
|
||||
]])], [tuklib_cv_physmem_method=pstat_getstatic],[
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <invent.h>
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
inv_state_t *st = NULL;
|
||||
setinvent_r(&st);
|
||||
getinvent_r(st);
|
||||
endinvent_r(st);
|
||||
return 0;
|
||||
}
|
||||
]])], [tuklib_cv_physmem_method=getinvent_r], [
|
||||
|
||||
# This version of sysinfo() is Linux-specific. Some non-Linux systems have
|
||||
# different sysinfo() so we must check $host_os.
|
||||
case $host_os in
|
||||
linux*)
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <sys/sysinfo.h>
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
struct sysinfo si;
|
||||
sysinfo(&si);
|
||||
return 0;
|
||||
}
|
||||
]])], [
|
||||
tuklib_cv_physmem_method=sysinfo
|
||||
], [
|
||||
tuklib_cv_physmem_method=unknown
|
||||
])
|
||||
;;
|
||||
*)
|
||||
tuklib_cv_physmem_method=unknown
|
||||
;;
|
||||
esac
|
||||
])])])])])])])])
|
||||
|
||||
case $tuklib_cv_physmem_method in
|
||||
aix)
|
||||
AC_DEFINE([TUKLIB_PHYSMEM_AIX], [1],
|
||||
[Define to 1 if the amount of physical memory
|
||||
can be detected with _system_configuration.physmem.])
|
||||
;;
|
||||
sysconf)
|
||||
AC_DEFINE([TUKLIB_PHYSMEM_SYSCONF], [1],
|
||||
[Define to 1 if the amount of physical memory can
|
||||
be detected with sysconf(_SC_PAGESIZE) and
|
||||
sysconf(_SC_PHYS_PAGES).])
|
||||
;;
|
||||
sysctl)
|
||||
AC_DEFINE([TUKLIB_PHYSMEM_SYSCTL], [1],
|
||||
[Define to 1 if the amount of physical memory can
|
||||
be detected with sysctl().])
|
||||
;;
|
||||
getsysinfo)
|
||||
AC_DEFINE([TUKLIB_PHYSMEM_GETSYSINFO], [1],
|
||||
[Define to 1 if the amount of physical memory can
|
||||
be detected with getsysinfo().])
|
||||
;;
|
||||
pstat_getstatic)
|
||||
AC_DEFINE([TUKLIB_PHYSMEM_PSTAT_GETSTATIC], [1],
|
||||
[Define to 1 if the amount of physical memory can
|
||||
be detected with pstat_getstatic().])
|
||||
;;
|
||||
getinvent_r)
|
||||
AC_DEFINE([TUKLIB_PHYSMEM_GETINVENT_R], [1],
|
||||
[Define to 1 if the amount of physical memory
|
||||
can be detected with getinvent_r().])
|
||||
;;
|
||||
sysinfo)
|
||||
AC_DEFINE([TUKLIB_PHYSMEM_SYSINFO], [1],
|
||||
[Define to 1 if the amount of physical memory
|
||||
can be detected with Linux sysinfo().])
|
||||
;;
|
||||
esac
|
||||
])dnl
|
||||
25
m4/tuklib_progname.m4
Normal file
25
m4/tuklib_progname.m4
Normal file
@@ -0,0 +1,25 @@
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# TUKLIB_PROGNAME
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Put argv[0] into a global variable progname. On DOS-like systems,
|
||||
# modify it so that it looks nice (no full path or .exe suffix).
|
||||
#
|
||||
# This .m4 file is needed allow this module to use glibc's
|
||||
# program_invocation_name.
|
||||
#
|
||||
# COPYING
|
||||
#
|
||||
# Author: Lasse Collin
|
||||
#
|
||||
# This file has been put into the public domain.
|
||||
# You can do whatever you want with this file.
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([TUKLIB_PROGNAME], [
|
||||
AC_REQUIRE([TUKLIB_COMMON])
|
||||
AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
|
||||
])dnl
|
||||
31
po/.gitignore
vendored
Normal file
31
po/.gitignore
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# autopoint
|
||||
Makefile.in.in
|
||||
Makevars.template
|
||||
Rules-quot
|
||||
boldquot.sed
|
||||
en@boldquot.header
|
||||
en@quot.header
|
||||
insert-header.sin
|
||||
quot.sed
|
||||
remove-potcdate.sin
|
||||
|
||||
# configure
|
||||
Makefile.in
|
||||
Makefile
|
||||
POTFILES
|
||||
|
||||
# intermediate files (make)
|
||||
stamp-poT
|
||||
xz.po
|
||||
xz.1po
|
||||
xz.2po
|
||||
*.new.po
|
||||
|
||||
# make
|
||||
remove-potcdate.sed
|
||||
xz.mo
|
||||
stamp-po
|
||||
*.gmo
|
||||
|
||||
# cached templates (make)
|
||||
xz.pot
|
||||
@@ -1 +1,5 @@
|
||||
fi
|
||||
cs
|
||||
de
|
||||
fr
|
||||
it
|
||||
pl
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# List of source files which contain translatable strings.
|
||||
src/lzma/help.c
|
||||
src/lzma/alloc.c
|
||||
src/lzma/args.c
|
||||
src/lzma/error.c
|
||||
src/lzma/io.c
|
||||
src/lzma/list.c
|
||||
src/lzma/main.c
|
||||
src/lzma/options.c
|
||||
src/lzma/process.c
|
||||
src/lzma/suffix.c
|
||||
src/lzma/util.c
|
||||
lib/getopt.c
|
||||
src/xz/args.c
|
||||
src/xz/coder.c
|
||||
src/xz/file_io.c
|
||||
src/xz/hardware.c
|
||||
src/xz/list.c
|
||||
src/xz/main.c
|
||||
src/xz/message.c
|
||||
src/xz/options.c
|
||||
src/xz/signals.c
|
||||
src/xz/suffix.c
|
||||
src/xz/util.c
|
||||
src/common/tuklib_exit.c
|
||||
|
||||
949
po/cs.po
Normal file
949
po/cs.po
Normal file
@@ -0,0 +1,949 @@
|
||||
# XZ Utils Czech translation
|
||||
# This file is put in the public domain.
|
||||
# Marek Černocký <marek@manet.cz>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz-utils\n"
|
||||
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
|
||||
"POT-Creation-Date: 2010-12-03 11:25+0100\n"
|
||||
"PO-Revision-Date: 2010-12-03 11:32+0100\n"
|
||||
"Last-Translator: Marek Černocký <marek@manet.cz>\n"
|
||||
"Language-Team: Czech <diskuze@lists.l10n.cz>\n"
|
||||
"Language: cs\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n"
|
||||
"X-Poedit-Language: Czech\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#: src/xz/args.c:333
|
||||
#, c-format
|
||||
msgid "%s: Unknown file format type"
|
||||
msgstr "%s: Neznámý typ formátu souboru"
|
||||
|
||||
#: src/xz/args.c:356 src/xz/args.c:364
|
||||
#, c-format
|
||||
msgid "%s: Unsupported integrity check type"
|
||||
msgstr "%s: Neznámý typ kontroly integrity"
|
||||
|
||||
#: src/xz/args.c:382
|
||||
msgid "Only one file can be specified with `--files' or `--files0'."
|
||||
msgstr ""
|
||||
"Spolu s přepínači „--files“ nebo „--files0“ může být zadán pouze jeden soubor"
|
||||
|
||||
#: src/xz/args.c:445
|
||||
#, c-format
|
||||
msgid "The environment variable %s contains too many arguments"
|
||||
msgstr "Proměnná prostředí %s obsahuje příliš mnoho argumentů"
|
||||
|
||||
#: src/xz/coder.c:95
|
||||
msgid "Maximum number of filters is four"
|
||||
msgstr "Maximální počet filtrů je čtyři"
|
||||
|
||||
#: src/xz/coder.c:108
|
||||
msgid "Memory usage limit is too low for the given filter setup."
|
||||
msgstr "Omezení použitelné paměti je příliš malé pro dané nastavení filtru."
|
||||
|
||||
#: src/xz/coder.c:129
|
||||
msgid "Using a preset in raw mode is discouraged."
|
||||
msgstr "Použití přednastavení v režimu raw je nevhodné."
|
||||
|
||||
#: src/xz/coder.c:131
|
||||
msgid "The exact options of the presets may vary between software versions."
|
||||
msgstr ""
|
||||
"Přesné volby u přednastavení se mohou lišit mezi různými verzemi softwaru."
|
||||
|
||||
#: src/xz/coder.c:157
|
||||
msgid "The .lzma format supports only the LZMA1 filter"
|
||||
msgstr "Formát .lzma podporuje pouze filtr LZMA1"
|
||||
|
||||
#: src/xz/coder.c:165
|
||||
msgid "LZMA1 cannot be used with the .xz format"
|
||||
msgstr "LZMA1 nelze použít s formátem .xz"
|
||||
|
||||
#: src/xz/coder.c:182
|
||||
msgid "Unsupported filter chain or filter options"
|
||||
msgstr "Nepodporovaný omezující filtr nebo volby filtru"
|
||||
|
||||
#: src/xz/coder.c:190
|
||||
#, c-format
|
||||
msgid "Decompression will need %s MiB of memory."
|
||||
msgstr "Dekomprimace bude vyžadovat %s MiB paměti."
|
||||
|
||||
#: src/xz/coder.c:247
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the "
|
||||
"memory usage limit of %s MiB"
|
||||
msgstr ""
|
||||
"Přizpůsobit velikost slovníku LZMA%c z %s MiB na %s MiB, tak aby nebylo "
|
||||
"překročeno omezení použitelné paměti %s MiB"
|
||||
|
||||
#. TRANSLATORS: When compression or decompression finishes,
|
||||
#. and xz is going to remove the source file, xz first checks
|
||||
#. if the source file still exists, and if it does, does its
|
||||
#. device and inode numbers match what xz saw when it opened
|
||||
#. the source file. If these checks fail, this message is
|
||||
#. shown, %s being the filename, and the file is not deleted.
|
||||
#. The check for device and inode numbers is there, because
|
||||
#. it is possible that the user has put a new file in place
|
||||
#. of the original file, and in that case it obviously
|
||||
#. shouldn't be removed.
|
||||
#: src/xz/file_io.c:137
|
||||
#, c-format
|
||||
msgid "%s: File seems to have been moved, not removing"
|
||||
msgstr "%s: Vypadá to, že soubor byl přesunut, proto nebude odstraněn"
|
||||
|
||||
#: src/xz/file_io.c:144 src/xz/file_io.c:590
|
||||
#, c-format
|
||||
msgid "%s: Cannot remove: %s"
|
||||
msgstr "%s: Nelze odstranit: %s"
|
||||
|
||||
#: src/xz/file_io.c:169
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file owner: %s"
|
||||
msgstr "%s: Nelze nastavit vlastníka souboru: %s"
|
||||
|
||||
#: src/xz/file_io.c:175
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file group: %s"
|
||||
msgstr "%s: Nelze nastavit skupinu souboru: %s"
|
||||
|
||||
#: src/xz/file_io.c:194
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file permissions: %s"
|
||||
msgstr "%s: Nelze nastavit oprávnění souboru: %s"
|
||||
|
||||
#: src/xz/file_io.c:337 src/xz/file_io.c:420
|
||||
#, c-format
|
||||
msgid "%s: Is a symbolic link, skipping"
|
||||
msgstr "%s: Jedná se o symbolický odkaz, vynechává se"
|
||||
|
||||
#: src/xz/file_io.c:455
|
||||
#, c-format
|
||||
msgid "%s: Is a directory, skipping"
|
||||
msgstr "%s: Jedná se o složku, vynechává se"
|
||||
|
||||
#: src/xz/file_io.c:462
|
||||
#, c-format
|
||||
msgid "%s: Not a regular file, skipping"
|
||||
msgstr "%s: Nejedná se o běžný soubor, vynechává se"
|
||||
|
||||
#: src/xz/file_io.c:479
|
||||
#, c-format
|
||||
msgid "%s: File has setuid or setgid bit set, skipping"
|
||||
msgstr "%s: Soubor má nastavený bit setuid nebo setgid, vynechává se"
|
||||
|
||||
#: src/xz/file_io.c:486
|
||||
#, c-format
|
||||
msgid "%s: File has sticky bit set, skipping"
|
||||
msgstr "%s: Soubor má nastavený bit sticky, vynechává se"
|
||||
|
||||
#: src/xz/file_io.c:493
|
||||
#, c-format
|
||||
msgid "%s: Input file has more than one hard link, skipping"
|
||||
msgstr "%s: Vstupní soubor má více než jeden pevný odkaz, vynechává se"
|
||||
|
||||
#: src/xz/file_io.c:714
|
||||
#, c-format
|
||||
msgid "Error restoring the O_APPEND flag to standard output: %s"
|
||||
msgstr "Chyba při obnovení příznaku O_APPEND na standardní výstup: %s"
|
||||
|
||||
#: src/xz/file_io.c:726
|
||||
#, c-format
|
||||
msgid "%s: Closing the file failed: %s"
|
||||
msgstr "%s: Selhalo zavření souboru: %s"
|
||||
|
||||
#: src/xz/file_io.c:762 src/xz/file_io.c:946
|
||||
#, c-format
|
||||
msgid "%s: Seeking failed when trying to create a sparse file: %s"
|
||||
msgstr ""
|
||||
"%s: Selhalo nastavení pozice při pokusu o vytvoření souboru řídké matice: %s"
|
||||
|
||||
#: src/xz/file_io.c:821
|
||||
#, c-format
|
||||
msgid "%s: Read error: %s"
|
||||
msgstr "%s: Chyba čtení: %s"
|
||||
|
||||
#: src/xz/file_io.c:844
|
||||
#, c-format
|
||||
msgid "%s: Error seeking the file: %s"
|
||||
msgstr "%s: Chyba při posunu v rámci souboru: %s"
|
||||
|
||||
#: src/xz/file_io.c:854
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of file"
|
||||
msgstr "%s: Neočekávaný konec souboru"
|
||||
|
||||
#: src/xz/file_io.c:904
|
||||
#, c-format
|
||||
msgid "%s: Write error: %s"
|
||||
msgstr "%s: Chyba zápisu: %s"
|
||||
|
||||
#: src/xz/hardware.c:100
|
||||
msgid "Disabled"
|
||||
msgstr "Vypnuto"
|
||||
|
||||
#. TRANSLATORS: Test with "xz --info-memory" to see if
|
||||
#. the alignment looks nice.
|
||||
#: src/xz/hardware.c:119
|
||||
msgid "Total amount of physical memory (RAM): "
|
||||
msgstr "Celkové množství fyzické paměti (RAM): "
|
||||
|
||||
#: src/xz/hardware.c:121
|
||||
msgid "Memory usage limit for compression: "
|
||||
msgstr "Omezení použitelné paměti pro komprimaci: "
|
||||
|
||||
#: src/xz/hardware.c:123
|
||||
msgid "Memory usage limit for decompression: "
|
||||
msgstr "Omezení použitelné paměti pro dekomprimaci:"
|
||||
|
||||
#. TRANSLATORS: Indicates that there is no integrity check.
|
||||
#. This string is used in tables, so the width must not
|
||||
#. exceed ten columns with a fixed-width font.
|
||||
#: src/xz/list.c:62
|
||||
msgid "None"
|
||||
msgstr "žádná"
|
||||
|
||||
#. TRANSLATORS: Indicates that integrity check name is not known,
|
||||
#. but the Check ID is known (here 2). This and other "Unknown-N"
|
||||
#. strings are used in tables, so the width must not exceed ten
|
||||
#. columns with a fixed-width font. It's OK to omit the dash if
|
||||
#. you need space for one extra letter, but don't use spaces.
|
||||
#: src/xz/list.c:69
|
||||
msgid "Unknown-2"
|
||||
msgstr "neznámá-2"
|
||||
|
||||
#: src/xz/list.c:70
|
||||
msgid "Unknown-3"
|
||||
msgstr "neznámá-3"
|
||||
|
||||
#: src/xz/list.c:72
|
||||
msgid "Unknown-5"
|
||||
msgstr "neznámá-5"
|
||||
|
||||
#: src/xz/list.c:73
|
||||
msgid "Unknown-6"
|
||||
msgstr "neznámá-6"
|
||||
|
||||
#: src/xz/list.c:74
|
||||
msgid "Unknown-7"
|
||||
msgstr "neznámá-7"
|
||||
|
||||
#: src/xz/list.c:75
|
||||
msgid "Unknown-8"
|
||||
msgstr "neznámá-8"
|
||||
|
||||
#: src/xz/list.c:76
|
||||
msgid "Unknown-9"
|
||||
msgstr "neznámá-9"
|
||||
|
||||
#: src/xz/list.c:78
|
||||
msgid "Unknown-11"
|
||||
msgstr "neznámá-11"
|
||||
|
||||
#: src/xz/list.c:79
|
||||
msgid "Unknown-12"
|
||||
msgstr "neznámá-12"
|
||||
|
||||
#: src/xz/list.c:80
|
||||
msgid "Unknown-13"
|
||||
msgstr "neznámá-13"
|
||||
|
||||
#: src/xz/list.c:81
|
||||
msgid "Unknown-14"
|
||||
msgstr "neznámá-14"
|
||||
|
||||
#: src/xz/list.c:82
|
||||
msgid "Unknown-15"
|
||||
msgstr "neznámá-15"
|
||||
|
||||
#: src/xz/list.c:126
|
||||
#, c-format
|
||||
msgid "%s: File is empty"
|
||||
msgstr "%s: Soubor je prázdný"
|
||||
|
||||
#: src/xz/list.c:131
|
||||
#, c-format
|
||||
msgid "%s: Too small to be a valid .xz file"
|
||||
msgstr "%s: Je příliš malý na to, aby to mohl být platný soubor .xz"
|
||||
|
||||
#. TRANSLATORS: These are column headings. From Strms (Streams)
|
||||
#. to Ratio, the columns are right aligned. Check and Filename
|
||||
#. are left aligned. If you need longer words, it's OK to
|
||||
#. use two lines here. Test with "xz -l foo.xz".
|
||||
#: src/xz/list.c:612
|
||||
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
|
||||
msgstr "Proud Bloky Komprim Nekomprim Poměr Kontrl Název souboru"
|
||||
|
||||
#: src/xz/list.c:652
|
||||
#, c-format
|
||||
msgid " Streams: %s\n"
|
||||
msgstr " Proudů: %s\n"
|
||||
|
||||
#: src/xz/list.c:654
|
||||
#, c-format
|
||||
msgid " Blocks: %s\n"
|
||||
msgstr " Bloků: %s\n"
|
||||
|
||||
#: src/xz/list.c:656
|
||||
#, c-format
|
||||
msgid " Compressed size: %s\n"
|
||||
msgstr " Komprimovaná velikost: %s\n"
|
||||
|
||||
#: src/xz/list.c:659
|
||||
#, c-format
|
||||
msgid " Uncompressed size: %s\n"
|
||||
msgstr " Nekomprimovaná velikost: %s\n"
|
||||
|
||||
#: src/xz/list.c:662
|
||||
#, c-format
|
||||
msgid " Ratio: %s\n"
|
||||
msgstr " Poměr komprimace: %s\n"
|
||||
|
||||
#: src/xz/list.c:664
|
||||
#, c-format
|
||||
msgid " Check: %s\n"
|
||||
msgstr " Typ kontroly: %s\n"
|
||||
|
||||
#: src/xz/list.c:665
|
||||
#, c-format
|
||||
msgid " Stream padding: %s\n"
|
||||
msgstr " Zarovnání proudu: %s\n"
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All except
|
||||
#. Check are right aligned; Check is left aligned. Test with
|
||||
#. "xz -lv foo.xz".
|
||||
#: src/xz/list.c:693
|
||||
msgid ""
|
||||
" Streams:\n"
|
||||
" Stream Blocks CompOffset UncompOffset CompSize "
|
||||
"UncompSize Ratio Check Padding"
|
||||
msgstr ""
|
||||
" Proudy:\n"
|
||||
" Proud Bloky KomprPozice NekomprPozice KomprVelikost "
|
||||
"NekomprVelikost Poměr Kontrola Zarovnání"
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All
|
||||
#. except Check are right aligned; Check is left aligned.
|
||||
#: src/xz/list.c:748
|
||||
#, c-format
|
||||
msgid ""
|
||||
" Blocks:\n"
|
||||
" Stream Block CompOffset UncompOffset TotalSize "
|
||||
"UncompSize Ratio Check"
|
||||
msgstr ""
|
||||
" Bloky:\n"
|
||||
" Proud Blok KomprPozice NekomprPozice CelkVelikost "
|
||||
"NekomprVelikost Poměr Kontrola"
|
||||
|
||||
#. TRANSLATORS: These are additional column headings
|
||||
#. for the most verbose listing mode. CheckVal
|
||||
#. (Check value), Flags, and Filters are left aligned.
|
||||
#. Header (Block Header Size), CompSize, and MemUsage
|
||||
#. are right aligned. %*s is replaced with 0-120
|
||||
#. spaces to make the CheckVal column wide enough.
|
||||
#. Test with "xz -lvv foo.xz".
|
||||
#: src/xz/list.c:760
|
||||
#, c-format
|
||||
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
|
||||
msgstr " KontrHod %*s Hlavič Příznaky KomprVel PoužiPam Filtry"
|
||||
|
||||
#: src/xz/list.c:838 src/xz/list.c:1007
|
||||
#, c-format
|
||||
msgid " Memory needed: %s MiB\n"
|
||||
msgstr " Potřebná paměť: %s MiB\n"
|
||||
|
||||
#: src/xz/list.c:840 src/xz/list.c:1009
|
||||
#, c-format
|
||||
msgid " Sizes in headers: %s\n"
|
||||
msgstr " Velikosti v hlavičkách: %s\n"
|
||||
|
||||
#: src/xz/list.c:841 src/xz/list.c:1010
|
||||
msgid "Yes"
|
||||
msgstr "Ano"
|
||||
|
||||
#: src/xz/list.c:841 src/xz/list.c:1010
|
||||
msgid "No"
|
||||
msgstr "Ne"
|
||||
|
||||
#. TRANSLATORS: %s is an integer. Only the plural form of this
|
||||
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
|
||||
#: src/xz/list.c:986
|
||||
#, c-format
|
||||
msgid "%s file\n"
|
||||
msgid_plural "%s files\n"
|
||||
msgstr[0] "%s soubor\n"
|
||||
msgstr[1] "%s soubory\n"
|
||||
msgstr[2] "%s souborů\n"
|
||||
|
||||
#: src/xz/list.c:999
|
||||
msgid "Totals:"
|
||||
msgstr "Celkem:"
|
||||
|
||||
#: src/xz/list.c:1000
|
||||
#, c-format
|
||||
msgid " Number of files: %s\n"
|
||||
msgstr " Počet souborů: %s\n"
|
||||
|
||||
#: src/xz/list.c:1072
|
||||
msgid "--list works only on .xz files (--format=xz or --format=auto)"
|
||||
msgstr "--list pracuje pouze se soubory .xz (--format=xz nebo --format=auto)"
|
||||
|
||||
#: src/xz/list.c:1078
|
||||
msgid "--list does not support reading from standard input"
|
||||
msgstr "--list nepodporuje čtení ze standardního vstupu"
|
||||
|
||||
#: src/xz/main.c:89
|
||||
#, c-format
|
||||
msgid "%s: Error reading filenames: %s"
|
||||
msgstr "%s: Chyba při čtení názvů souborů: %s"
|
||||
|
||||
#: src/xz/main.c:96
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of input when reading filenames"
|
||||
msgstr "%s: Neočekávaný konec vstupu při čtení názvů souborů"
|
||||
|
||||
#: src/xz/main.c:120
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s: Null character found when reading filenames; maybe you meant to use `--"
|
||||
"files0' instead of `--files'?"
|
||||
msgstr ""
|
||||
"%s: Byl nalezen nulový znak při čtení názvů souborů; nechtěli jste náhodou "
|
||||
"použít „--files0“ místo „--files“?"
|
||||
|
||||
#: src/xz/main.c:174
|
||||
msgid "Compression and decompression with --robot are not supported yet."
|
||||
msgstr "Komprimace a dekomprimace s přepínačem --robot není zatím podporovaná."
|
||||
|
||||
#: src/xz/main.c:231
|
||||
msgid ""
|
||||
"Cannot read data from standard input when reading filenames from standard "
|
||||
"input"
|
||||
msgstr ""
|
||||
"Ze standardního vstupu nelze číst data, když se ze standardního vstupu "
|
||||
"načítají názvy souborů"
|
||||
|
||||
#: src/xz/message.c:792 src/xz/message.c:842
|
||||
msgid "Internal error (bug)"
|
||||
msgstr "Interní chyba"
|
||||
|
||||
#: src/xz/message.c:799
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr "Nelze ustanovit ovladač signálu"
|
||||
|
||||
#: src/xz/message.c:808
|
||||
msgid "No integrity check; not verifying file integrity"
|
||||
msgstr "Žádná kontrola integrity; integrita souboru se nebude ověřovat"
|
||||
|
||||
#: src/xz/message.c:811
|
||||
msgid "Unsupported type of integrity check; not verifying file integrity"
|
||||
msgstr ""
|
||||
"Nepodporovaný typ kontroly integrity; integrita souboru se nebude ověřovat"
|
||||
|
||||
#: src/xz/message.c:818
|
||||
msgid "Memory usage limit reached"
|
||||
msgstr "Dosaženo omezení použitelné paměti"
|
||||
|
||||
#: src/xz/message.c:821
|
||||
msgid "File format not recognized"
|
||||
msgstr "Formát souboru nebyl rozpoznán"
|
||||
|
||||
#: src/xz/message.c:824
|
||||
msgid "Unsupported options"
|
||||
msgstr "Nepodporovaná volba"
|
||||
|
||||
#: src/xz/message.c:827
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr "Komprimovaná data jsou poškozená"
|
||||
|
||||
#: src/xz/message.c:830
|
||||
msgid "Unexpected end of input"
|
||||
msgstr "Neočekávaný konec vstupu"
|
||||
|
||||
#: src/xz/message.c:881
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limit is %s."
|
||||
msgstr "Je vyžadováno %s MiB paměti. Limit je %s."
|
||||
|
||||
#: src/xz/message.c:1048
|
||||
#, c-format
|
||||
msgid "%s: Filter chain: %s\n"
|
||||
msgstr "%s: Omezující filtr: %s\n"
|
||||
|
||||
#: src/xz/message.c:1058
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Zkuste „%s --help“ pro více informací"
|
||||
|
||||
#: src/xz/message.c:1084
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
"Compress or decompress FILEs in the .xz format.\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Použití: %s [PŘEPÍNAČ]... [SOUBOR]...\n"
|
||||
"Komprimuje nebo dekomprimuje SOUBORy ve formátu xz.\n"
|
||||
"\n"
|
||||
|
||||
#: src/xz/message.c:1091
|
||||
msgid ""
|
||||
"Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr ""
|
||||
"Povinné argumenty pro dlouhé přepínače jsou povinné rovněž pro krátké "
|
||||
"přepínače.\n"
|
||||
|
||||
#: src/xz/message.c:1095
|
||||
msgid " Operation mode:\n"
|
||||
msgstr "Operační režim:\n"
|
||||
|
||||
#: src/xz/message.c:1098
|
||||
msgid ""
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
" -t, --test test compressed file integrity\n"
|
||||
" -l, --list list information about .xz files"
|
||||
msgstr ""
|
||||
" -z, --compress provést komprimaci\n"
|
||||
" -d, --decompress provést dekomprimaci\n"
|
||||
" -t, --test testovat integritu komprimovaného souboru\n"
|
||||
" -l, --list vypsat informace o souborech .xz"
|
||||
|
||||
#: src/xz/message.c:1104
|
||||
msgid ""
|
||||
"\n"
|
||||
" Operation modifiers:\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Modifikátory operací:\n"
|
||||
|
||||
#: src/xz/message.c:1107
|
||||
msgid ""
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
" -c, --stdout write to standard output and don't delete input files"
|
||||
msgstr ""
|
||||
" -k, --keep zachovat (nemazat) vstupní soubory\n"
|
||||
" -f, --force vynutit přepis výstupního souboru a de/komprimovat "
|
||||
"odkazy\n"
|
||||
" -c, --stdout zapisovat na standardní výstup a nemazat vstupní "
|
||||
"soubory"
|
||||
|
||||
#: src/xz/message.c:1113
|
||||
msgid ""
|
||||
" --no-sparse do not create sparse files when decompressing\n"
|
||||
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
" --files[=FILE] read filenames to process from FILE; if FILE is\n"
|
||||
" omitted, filenames are read from the standard input;\n"
|
||||
" filenames must be terminated with the newline "
|
||||
"character\n"
|
||||
" --files0[=FILE] like --files but use the null character as terminator"
|
||||
msgstr ""
|
||||
" --no-sparse nevytvářet při dekomprimaci soubory řídkých matic\n"
|
||||
" -S, --suffix=.PRIP použít u komprimovaných souborů příponu „.PRIP“\n"
|
||||
" --files[=SOUBOR] číst názvy souborů, které se mají zpracovat, ze "
|
||||
"SOUBORu;\n"
|
||||
" pokud není SOUBOR zadán, čte se ze standardního "
|
||||
"vstupu;\n"
|
||||
" názvy souborů musí být zakončeny znakem nového řádku\n"
|
||||
" --files0[=SOUBOR] stejné jako --files, ale použít k zakončování nulový "
|
||||
"znak"
|
||||
|
||||
#: src/xz/message.c:1121
|
||||
msgid ""
|
||||
"\n"
|
||||
" Basic file format and compression options:\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Základní přepínače pro formát souboru a komprimaci:\n"
|
||||
|
||||
#: src/xz/message.c:1123
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', and `raw'\n"
|
||||
" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
|
||||
" `crc32', `crc64' (default), or `sha256'"
|
||||
msgstr ""
|
||||
" -F, --format=FORMÁT formát souboru k zakódování nebo dekódování; možné\n"
|
||||
" hodnoty jsou „auto“ (výchozí), „xz“, „lzma“ a „raw“\n"
|
||||
" -C, --check=KONTROLA typ kontroly integrity: „none“ (používejte s "
|
||||
"rozmyslem),\n"
|
||||
" „crc32“, „crc64“ (výchozí) nebo „sha256“"
|
||||
|
||||
#: src/xz/message.c:1130
|
||||
msgid ""
|
||||
" -0 ... -9 compression preset; default is 6; take compressor "
|
||||
"*and*\n"
|
||||
" decompressor memory usage into account before using "
|
||||
"7-9!"
|
||||
msgstr ""
|
||||
" -0 .. -9 přednastavení komprimace; výchozí je 6; než "
|
||||
"použijete\n"
|
||||
" hodnoty 7 – 9, vezměte do úvahy množství použité "
|
||||
"paměti"
|
||||
|
||||
#: src/xz/message.c:1134
|
||||
msgid ""
|
||||
" -e, --extreme try to improve compression ratio by using more CPU "
|
||||
"time;\n"
|
||||
" does not affect decompressor memory requirements"
|
||||
msgstr ""
|
||||
" -e, --extreme zkusit zlepšit poměr komprimace využitím více času\n"
|
||||
" procesoru; nemá vliv na paměťové nároky dekomprimace"
|
||||
|
||||
#: src/xz/message.c:1139
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT\n"
|
||||
" set memory usage limit for compression, "
|
||||
"decompression,\n"
|
||||
" or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
|
||||
msgstr ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT\n"
|
||||
" nastaví omezení použitelné paměti pro komprimaci,\n"
|
||||
" dekomprimaci nebo obojí; LIMIT je v bajtech, % z "
|
||||
"paměti\n"
|
||||
" RAM nebo 0 pro výchozí"
|
||||
|
||||
#: src/xz/message.c:1146
|
||||
msgid ""
|
||||
" --no-adjust if compression settings exceed the memory usage "
|
||||
"limit,\n"
|
||||
" give an error instead of adjusting the settings "
|
||||
"downwards"
|
||||
msgstr ""
|
||||
" --no-adjust pokud nastavení komprimace přesáhne omezení "
|
||||
"použitelné\n"
|
||||
" paměti, předat chybu namísto snížení nastavení"
|
||||
|
||||
#: src/xz/message.c:1152
|
||||
msgid ""
|
||||
"\n"
|
||||
" Custom filter chain for compression (alternative for using presets):"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Vlastní omezující filtr pro komprimaci (alternativa k použití "
|
||||
"přednastavených):"
|
||||
|
||||
#: src/xz/message.c:1161
|
||||
msgid ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero "
|
||||
"or\n"
|
||||
" --lzma2[=OPTS] more of the following options (valid values; "
|
||||
"default):\n"
|
||||
" preset=PRE reset options to a preset (0-9[e])\n"
|
||||
" dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n"
|
||||
" lc=NUM number of literal context bits (0-4; 3)\n"
|
||||
" lp=NUM number of literal position bits (0-4; 0)\n"
|
||||
" pb=NUM number of position bits (0-4; 2)\n"
|
||||
" mode=MODE compression mode (fast, normal; normal)\n"
|
||||
" nice=NUM nice length of a match (2-273; 64)\n"
|
||||
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; "
|
||||
"bt4)\n"
|
||||
" depth=NUM maximum search depth; 0=automatic "
|
||||
"(default)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --lzma1[=VOLBY] LZMA1 nebo LZMA2; VOLBY je čárkou oddělovaný seznam "
|
||||
"žádné\n"
|
||||
" --lzma2[=VOLBY] nebo více následujících voleb (platné hodnoty; "
|
||||
"výchozí):\n"
|
||||
" preset=PŘE změnit volby na PŘEdnastavené (0 – 9"
|
||||
"[e])\n"
|
||||
" dict=POČ velikost slovníku (4 KiB – 1536 MiB; 8 "
|
||||
"MiB)\n"
|
||||
" lc=POČ počet kontextových bitů literálu (0 – 4; "
|
||||
"3)\n"
|
||||
" lp=POČ počet pozičních bitů literálu (0 – 4; "
|
||||
"0)\n"
|
||||
" pb=POČ počet pozičních bitů (0 – 4; 2)\n"
|
||||
" mode=REŽIM režim komprimace (fast, normal; normal)\n"
|
||||
" nice=NUM příznivá délka shody (2 – 273; 64)\n"
|
||||
" mf=NÁZEV hledání shod (hc3, hc4, bt2, bt3, bt4; "
|
||||
"bt4)\n"
|
||||
" depth=POČ maximální hloubka prohledávání;\n"
|
||||
" 0 = automaticky (výchozí)"
|
||||
|
||||
#: src/xz/message.c:1176
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
|
||||
" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
|
||||
" --arm[=OPTS] ARM BCJ filter (little endian only)\n"
|
||||
" --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
|
||||
" --sparc[=OPTS] SPARC BCJ filter\n"
|
||||
" Valid OPTS for all BCJ filters:\n"
|
||||
" start=NUM start offset for conversions (default=0)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --x86[=VOLBY] Filtr x86 BCJ (32bitový a 64bitový)\n"
|
||||
" --powerpc[=VOLBY] Filtr PowerPC BCJ (pouze big endian)\n"
|
||||
" --ia64[=VOLBY] Filtr IA64 (Itanium) BCJ\n"
|
||||
" --arm[=VOLBY] Filtr ARM BCJ (pouze little endian)\n"
|
||||
" --armthumb[=VOLBY] Filtr ARM-Thumb BCJ (pouze little endian)\n"
|
||||
" --sparc[=VOLBY] Filtr SPARC BCJ\n"
|
||||
" Platné volby pro všechny filtry BCJ:\n"
|
||||
" start=POČ počáteční posun pro převody (výchozí=0)"
|
||||
|
||||
#: src/xz/message.c:1188
|
||||
msgid ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
|
||||
" dist=NUM distance between bytes being subtracted\n"
|
||||
" from each other (1-256; 1)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --delta[=VOLBY] Filtr Delta; platné VOLBY (platné hodnoty; výchozí):\n"
|
||||
" dist=POČ vzdálenost mezi bajty, které jsou "
|
||||
"odečítány\n"
|
||||
" jeden od druhého (1 – 256; 1)"
|
||||
|
||||
#: src/xz/message.c:1196
|
||||
msgid ""
|
||||
"\n"
|
||||
" Other options:\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Ostatní přepínače:\n"
|
||||
|
||||
#: src/xz/message.c:1199
|
||||
msgid ""
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors "
|
||||
"too\n"
|
||||
" -v, --verbose be verbose; specify twice for even more verbose"
|
||||
msgstr ""
|
||||
" -q, --quiet potlačit varování; zadáním dvakrát, potlačíte i "
|
||||
"chyby\n"
|
||||
" -v, --verbose podrobnější zprávy; zadáním dvakrát, budou ještě\n"
|
||||
" podrobnější"
|
||||
|
||||
#: src/xz/message.c:1204
|
||||
msgid " -Q, --no-warn make warnings not affect the exit status"
|
||||
msgstr " -Q, --no-warn způsobí, že varování neovlivní stav ukončení"
|
||||
|
||||
#: src/xz/message.c:1206
|
||||
msgid ""
|
||||
" --robot use machine-parsable messages (useful for scripts)"
|
||||
msgstr ""
|
||||
" --robot použít strojově analyzovatelné zprávy (užitečné pro\n"
|
||||
" skripty)"
|
||||
|
||||
#: src/xz/message.c:1209
|
||||
msgid ""
|
||||
" --info-memory display the total amount of RAM and the currently "
|
||||
"active\n"
|
||||
" memory usage limits, and exit"
|
||||
msgstr ""
|
||||
" --info-memory zobrazit celkové množství paměti RAM a současné "
|
||||
"aktivní\n"
|
||||
" omezení použitelné paměti a skončit"
|
||||
|
||||
#: src/xz/message.c:1212
|
||||
msgid ""
|
||||
" -h, --help display the short help (lists only the basic options)\n"
|
||||
" -H, --long-help display this long help and exit"
|
||||
msgstr ""
|
||||
" -h, --help zobrazit krátkou nápovědu (vypíše jen základní "
|
||||
"přepínače)\n"
|
||||
" -H, --long-help zobrazit tuto úplnou nápovědu a skončit"
|
||||
|
||||
#: src/xz/message.c:1216
|
||||
msgid ""
|
||||
" -h, --help display this short help and exit\n"
|
||||
" -H, --long-help display the long help (lists also the advanced options)"
|
||||
msgstr ""
|
||||
" -h, --help zobrazit tuto zkrácenou nápovědu a skončit\n"
|
||||
" -H, --long-help zobrazit úplnou nápovědu (vypíše i pokročilé "
|
||||
"přepínače)"
|
||||
|
||||
#: src/xz/message.c:1221
|
||||
msgid " -V, --version display the version number and exit"
|
||||
msgstr " -V, --version zobrazit číslo verze a skončit"
|
||||
|
||||
#: src/xz/message.c:1223
|
||||
msgid ""
|
||||
"\n"
|
||||
"With no FILE, or when FILE is -, read standard input.\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Pokud SOUBOR není zadán nebo pokud je -, bude se číst ze standardního "
|
||||
"vstupu.\n"
|
||||
|
||||
#. TRANSLATORS: This message indicates the bug reporting address
|
||||
#. for this package. Please add _another line_ saying
|
||||
#. "Report translation bugs to <...>\n" with the email or WWW
|
||||
#. address for translation bugs. Thanks.
|
||||
#: src/xz/message.c:1229
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr "Chyby hlaste na <%s> (v angličtině nebo finštině).\n"
|
||||
|
||||
#: src/xz/message.c:1231
|
||||
#, c-format
|
||||
msgid "%s home page: <%s>\n"
|
||||
msgstr "Domovská stránka %s: <%s>\n"
|
||||
|
||||
#: src/xz/options.c:86
|
||||
#, c-format
|
||||
msgid "%s: Options must be `name=value' pairs separated with commas"
|
||||
msgstr "%s: Volby musí být páry „název=hodnota“ oddělené čárkami"
|
||||
|
||||
#: src/xz/options.c:93
|
||||
#, c-format
|
||||
msgid "%s: Invalid option name"
|
||||
msgstr "%s: Neplatný název volby"
|
||||
|
||||
#: src/xz/options.c:113
|
||||
#, c-format
|
||||
msgid "%s: Invalid option value"
|
||||
msgstr "%s: Neplatná hodnota volby"
|
||||
|
||||
#: src/xz/options.c:247
|
||||
#, c-format
|
||||
msgid "Unsupported LZMA1/LZMA2 preset: %s"
|
||||
msgstr "Nepodporované přednastavení LZMA1/LZMA2: %s"
|
||||
|
||||
#: src/xz/options.c:355
|
||||
msgid "The sum of lc and lp must not exceed 4"
|
||||
msgstr "Součet lc a lp nesmí překročit hodnotu 4"
|
||||
|
||||
#: src/xz/options.c:359
|
||||
#, c-format
|
||||
msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
msgstr "Vybraný vyhledávač shod vyžaduje minimálně nice=%<PRIu32>"
|
||||
|
||||
#: src/xz/suffix.c:79 src/xz/suffix.c:164
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr ""
|
||||
"%s: S přepínačem --format=raw je vyžadován --sufix=.PRIP, vyjma zápisu do "
|
||||
"standardního výstupu"
|
||||
|
||||
#: src/xz/suffix.c:99
|
||||
#, c-format
|
||||
msgid "%s: Filename has an unknown suffix, skipping"
|
||||
msgstr "%s: Název souboru má neznámou příponu, vynechává se"
|
||||
|
||||
#: src/xz/suffix.c:154
|
||||
#, c-format
|
||||
msgid "%s: File already has `%s' suffix, skipping"
|
||||
msgstr "%s: Soubor již má příponu „%s“, vynechává se"
|
||||
|
||||
#: src/xz/suffix.c:205
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename suffix"
|
||||
msgstr "%s: Neplatná přípona názvu souboru"
|
||||
|
||||
#: src/xz/util.c:61
|
||||
#, c-format
|
||||
msgid "%s: Value is not a non-negative decimal integer"
|
||||
msgstr "%s: Hodnota není nezáporné desítkové číslo"
|
||||
|
||||
#: src/xz/util.c:103
|
||||
#, c-format
|
||||
msgid "%s: Invalid multiplier suffix"
|
||||
msgstr "%s: Neplatná jednotka s předponou"
|
||||
|
||||
#: src/xz/util.c:105
|
||||
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
|
||||
msgstr ""
|
||||
"Platné jednotky s předponami jsou „KiB“ (2^10 B), „MiB“ (2^20 B) a "
|
||||
"„GiB“ (2^30 B)."
|
||||
|
||||
#: src/xz/util.c:122
|
||||
#, c-format
|
||||
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
|
||||
msgstr "Hodnota volby „%s“ musí být v rozsahu [%<PRIu64>, %<PRIu64>]"
|
||||
|
||||
#: src/xz/util.c:247
|
||||
msgid "Empty filename, skipping"
|
||||
msgstr "Prázdný název souboru, vynechává se"
|
||||
|
||||
#: src/xz/util.c:261
|
||||
msgid "Compressed data cannot be read from a terminal"
|
||||
msgstr "Z terminálu nelze číst komprimovaná data"
|
||||
|
||||
#: src/xz/util.c:274
|
||||
msgid "Compressed data cannot be written to a terminal"
|
||||
msgstr "Do terminálu nelze zapisovat komprimovaná data"
|
||||
|
||||
#: src/common/tuklib_exit.c:39
|
||||
msgid "Writing to standard output failed"
|
||||
msgstr "Zápis do standardního výstupu selhal"
|
||||
|
||||
#: src/common/tuklib_exit.c:42
|
||||
msgid "Unknown error"
|
||||
msgstr "Neznámá chyba"
|
||||
|
||||
#~ msgid "Limit was %s MiB, but %s MiB would have been needed"
|
||||
#~ msgstr "Limit byl %s MiB, ale bylo by zapotřebí %s MiB"
|
||||
|
||||
#~ msgid "%s MiB (%s bytes)\n"
|
||||
#~ msgstr "%s MiB (%s bajtů)\n"
|
||||
|
||||
#~ msgid ""
|
||||
#~ " -e, --extreme use more CPU time when encoding to increase "
|
||||
#~ "compression\n"
|
||||
#~ " ratio without increasing memory usage of the decoder"
|
||||
#~ msgstr ""
|
||||
#~ " -e, --extreme využít více procesorového času pro kódování, čímž "
|
||||
#~ "se\n"
|
||||
#~ " zvýší kompresní poměr bez zvýšení paměti použité "
|
||||
#~ "kodérem"
|
||||
|
||||
#~ msgid ""
|
||||
#~ " -M, --memory=NUM use roughly NUM bytes of memory at maximum; 0 "
|
||||
#~ "indicates\n"
|
||||
#~ " the default setting, which is 40 % of total RAM"
|
||||
#~ msgstr ""
|
||||
#~ " -M, --memory=POČ použít zhruba POČ bajtů paměti jako maximum; 0 "
|
||||
#~ "znamená\n"
|
||||
#~ " výchozí nastavení, což je 40% celkového množství "
|
||||
#~ "paměti"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "\n"
|
||||
#~ " --subblock[=OPTS] Subblock filter; valid OPTS (valid values; "
|
||||
#~ "default):\n"
|
||||
#~ " size=NUM number of bytes of data per subblock\n"
|
||||
#~ " (1 - 256Mi; 4Ki)\n"
|
||||
#~ " rle=NUM run-length encoder chunk size (0-256; "
|
||||
#~ "0)"
|
||||
#~ msgstr ""
|
||||
#~ "\n"
|
||||
#~ " --subblock[=VOLBY] Subblokový filtr; platné VOLBY (platné hodnoty; "
|
||||
#~ "výchozí):\n"
|
||||
#~ " size=POČ počet bajtů dat na subblok\n"
|
||||
#~ " (1 - 256 Mi; 4 Ki)\n"
|
||||
#~ " rle=POČ velikost dávky pro kodér run-length "
|
||||
#~ "(0-256; 0)"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "On this system and configuration, this program will use a maximum of "
|
||||
#~ "roughly\n"
|
||||
#~ "%s MiB RAM and "
|
||||
#~ msgstr ""
|
||||
#~ "Na tomto systému a s tímto nastavením použije tento program maximum ze "
|
||||
#~ "zhruba\n"
|
||||
#~ "%s MiB RAM a "
|
||||
|
||||
#~ msgid ""
|
||||
#~ "one thread.\n"
|
||||
#~ "\n"
|
||||
#~ msgstr ""
|
||||
#~ "jedno vlákno.\n"
|
||||
#~ "\n"
|
||||
|
||||
#~ msgid "%s: Invalid multiplier suffix. Valid suffixes:"
|
||||
#~ msgstr "%s: Neplatná přípona. Platné přípony jsou:"
|
||||
903
po/de.po
Normal file
903
po/de.po
Normal file
@@ -0,0 +1,903 @@
|
||||
# XZ Utils German translation
|
||||
# This file is put in the public domain.
|
||||
# Andre Noll <maan@systemlinux.org>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: XZ Utils 4.999.9beta\n"
|
||||
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
|
||||
"POT-Creation-Date: 2010-09-11 17:07+0200\n"
|
||||
"PO-Revision-Date: 2010-09-07 20:27+0200\n"
|
||||
"Last-Translator: <maan@systemlinux.org>\n"
|
||||
"Language-Team: German\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: src/xz/args.c:333
|
||||
#, c-format
|
||||
msgid "%s: Unknown file format type"
|
||||
msgstr "%s: Unbekanntes file format"
|
||||
|
||||
#: src/xz/args.c:356 src/xz/args.c:364
|
||||
#, c-format
|
||||
msgid "%s: Unsupported integrity check type"
|
||||
msgstr "%s: Integritäts-Check Typ nicht unterstützt"
|
||||
|
||||
#: src/xz/args.c:382
|
||||
msgid "Only one file can be specified with `--files' or `--files0'."
|
||||
msgstr ""
|
||||
"Nur ein file kann als Argument für --files oder --files0 angegeben werden."
|
||||
|
||||
#: src/xz/args.c:445
|
||||
#, c-format
|
||||
msgid "The environment variable %s contains too many arguments"
|
||||
msgstr "Die Umgebungsvariable %s enthält zu viele Argumente"
|
||||
|
||||
#: src/xz/coder.c:95
|
||||
msgid "Maximum number of filters is four"
|
||||
msgstr "Maximal vier Filter möglich"
|
||||
|
||||
#: src/xz/coder.c:108
|
||||
msgid "Memory usage limit is too low for the given filter setup."
|
||||
msgstr ""
|
||||
"Das Speicher Limit ist zu niedrig für die gegebene Filter Konfiguration."
|
||||
|
||||
#: src/xz/coder.c:129
|
||||
msgid "Using a preset in raw mode is discouraged."
|
||||
msgstr "Verwendung der Voreinstellung im raw Modus wird nicht empfohlen."
|
||||
|
||||
#: src/xz/coder.c:131
|
||||
msgid "The exact options of the presets may vary between software versions."
|
||||
msgstr ""
|
||||
"Die genauen Optionen der Voreinstellung können zwischen Software Versionen "
|
||||
"variieren."
|
||||
|
||||
#: src/xz/coder.c:157
|
||||
msgid "The .lzma format supports only the LZMA1 filter"
|
||||
msgstr "Das .lzma Format unterstützt nur den LZMA1 Filter"
|
||||
|
||||
#: src/xz/coder.c:165
|
||||
msgid "LZMA1 cannot be used with the .xz format"
|
||||
msgstr "LZMA1 kann nicht mit dem .xz Format verwendet werden"
|
||||
|
||||
#: src/xz/coder.c:182
|
||||
msgid "Unsupported filter chain or filter options"
|
||||
msgstr "Optionen nicht unterstützt"
|
||||
|
||||
#: src/xz/coder.c:190
|
||||
#, c-format
|
||||
msgid "Decompression will need %s MiB of memory."
|
||||
msgstr "Dekompression wird %s MiB Speicher brauchen."
|
||||
|
||||
#: src/xz/coder.c:247
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the "
|
||||
"memory usage limit of %s MiB"
|
||||
msgstr ""
|
||||
"Passte LZMA%c Wörterbuch Größe von %s MiB to %s MiB an, um nicht das "
|
||||
"Speicher Nutzungslimit von %s MiB zu übersteigen"
|
||||
|
||||
#. TRANSLATORS: When compression or decompression finishes,
|
||||
#. and xz is going to remove the source file, xz first checks
|
||||
#. if the source file still exists, and if it does, does its
|
||||
#. device and inode numbers match what xz saw when it opened
|
||||
#. the source file. If these checks fail, this message is
|
||||
#. shown, %s being the filename, and the file is not deleted.
|
||||
#. The check for device and inode numbers is there, because
|
||||
#. it is possible that the user has put a new file in place
|
||||
#. of the original file, and in that case it obviously
|
||||
#. shouldn't be removed.
|
||||
#: src/xz/file_io.c:137
|
||||
#, c-format
|
||||
msgid "%s: File seems to have been moved, not removing"
|
||||
msgstr ""
|
||||
"%s: Datei scheint umbenannt worden zu sein, daher wird sie nicht gelöscht"
|
||||
|
||||
#: src/xz/file_io.c:144 src/xz/file_io.c:590
|
||||
#, c-format
|
||||
msgid "%s: Cannot remove: %s"
|
||||
msgstr "%s: Kann nicht löschen: %s"
|
||||
|
||||
#: src/xz/file_io.c:169
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file owner: %s"
|
||||
msgstr "%s: Kann Datei Eigentümer nicht setzen: %s"
|
||||
|
||||
#: src/xz/file_io.c:175
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file group: %s"
|
||||
msgstr "%s: Kann Datei Gruppe nicht setzen: %s"
|
||||
|
||||
#: src/xz/file_io.c:194
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file permissions: %s"
|
||||
msgstr "%s: Kann Zugriffsrechte nicht setzen: %s"
|
||||
|
||||
#: src/xz/file_io.c:337 src/xz/file_io.c:420
|
||||
#, c-format
|
||||
msgid "%s: Is a symbolic link, skipping"
|
||||
msgstr "%s: Überspringe symbolischen Verweis"
|
||||
|
||||
#: src/xz/file_io.c:455
|
||||
#, c-format
|
||||
msgid "%s: Is a directory, skipping"
|
||||
msgstr "%s: Überspringe Verzeichnis"
|
||||
|
||||
#: src/xz/file_io.c:462
|
||||
#, c-format
|
||||
msgid "%s: Not a regular file, skipping"
|
||||
msgstr "%s: Keine reguläre Datei, überspringe"
|
||||
|
||||
#: src/xz/file_io.c:479
|
||||
#, c-format
|
||||
msgid "%s: File has setuid or setgid bit set, skipping"
|
||||
msgstr "%s: Datei hat das setuid oder setgid Bit gesetzt, überspringe"
|
||||
|
||||
#: src/xz/file_io.c:486
|
||||
#, c-format
|
||||
msgid "%s: File has sticky bit set, skipping"
|
||||
msgstr "%s: Datei hat sticky Bit gesetzt, überspringe"
|
||||
|
||||
#: src/xz/file_io.c:493
|
||||
#, c-format
|
||||
msgid "%s: Input file has more than one hard link, skipping"
|
||||
msgstr "%s: Eingabedatei hat mehr als einen hard link, überspringe"
|
||||
|
||||
#: src/xz/file_io.c:714
|
||||
#, c-format
|
||||
msgid "Error restoring the O_APPEND flag to standard output: %s"
|
||||
msgstr ""
|
||||
"Fehler beim Wiederherstellen des O_APPEND flags bei Standard Output: %s"
|
||||
|
||||
#: src/xz/file_io.c:726
|
||||
#, c-format
|
||||
msgid "%s: Closing the file failed: %s"
|
||||
msgstr "%s: Fehler beim Schießen der Datei: %s"
|
||||
|
||||
#: src/xz/file_io.c:762 src/xz/file_io.c:946
|
||||
#, c-format
|
||||
msgid "%s: Seeking failed when trying to create a sparse file: %s"
|
||||
msgstr ""
|
||||
"%s: Positionierungsfehler beim Versuch eine sparse Datei zu erzeugen: %s"
|
||||
|
||||
#: src/xz/file_io.c:821
|
||||
#, c-format
|
||||
msgid "%s: Read error: %s"
|
||||
msgstr "%s: Lesefehler: %s"
|
||||
|
||||
#: src/xz/file_io.c:844
|
||||
#, c-format
|
||||
msgid "%s: Error seeking the file: %s"
|
||||
msgstr "%s: Fehler beim Lesen der Dateinamen: %s"
|
||||
|
||||
#: src/xz/file_io.c:854
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of file"
|
||||
msgstr "%s: Unerwartetes Ende der Datei"
|
||||
|
||||
#: src/xz/file_io.c:904
|
||||
#, c-format
|
||||
msgid "%s: Write error: %s"
|
||||
msgstr "%s: Schreibfehler: %s"
|
||||
|
||||
#: src/xz/hardware.c:100
|
||||
msgid "Disabled"
|
||||
msgstr "Deaktiviert"
|
||||
|
||||
#. TRANSLATORS: Test with "xz --info-memory" to see if
|
||||
#. the alignment looks nice.
|
||||
#: src/xz/hardware.c:119
|
||||
msgid "Total amount of physical memory (RAM): "
|
||||
msgstr "Gesamtmenge physikalischer Speicher (RAM): "
|
||||
|
||||
#: src/xz/hardware.c:121
|
||||
msgid "Memory usage limit for compression: "
|
||||
msgstr "Speicher Nutzungslimit für Kompression: "
|
||||
|
||||
#: src/xz/hardware.c:123
|
||||
msgid "Memory usage limit for decompression: "
|
||||
msgstr "Speicher Nutzungslimit für Dekompression: "
|
||||
|
||||
#. TRANSLATORS: Indicates that there is no integrity check.
|
||||
#. This string is used in tables, so the width must not
|
||||
#. exceed ten columns with a fixed-width font.
|
||||
#: src/xz/list.c:62
|
||||
msgid "None"
|
||||
msgstr "Kein"
|
||||
|
||||
#. TRANSLATORS: Indicates that integrity check name is not known,
|
||||
#. but the Check ID is known (here 2). This and other "Unknown-N"
|
||||
#. strings are used in tables, so the width must not exceed ten
|
||||
#. columns with a fixed-width font. It's OK to omit the dash if
|
||||
#. you need space for one extra letter.
|
||||
#: src/xz/list.c:69
|
||||
msgid "Unknown-2"
|
||||
msgstr "Unbek.2"
|
||||
|
||||
#: src/xz/list.c:70
|
||||
msgid "Unknown-3"
|
||||
msgstr "Unbek.3"
|
||||
|
||||
#: src/xz/list.c:72
|
||||
msgid "Unknown-5"
|
||||
msgstr "Unbek.5"
|
||||
|
||||
#: src/xz/list.c:73
|
||||
msgid "Unknown-6"
|
||||
msgstr "Unbek.6"
|
||||
|
||||
#: src/xz/list.c:74
|
||||
msgid "Unknown-7"
|
||||
msgstr "Unbek.7"
|
||||
|
||||
#: src/xz/list.c:75
|
||||
msgid "Unknown-8"
|
||||
msgstr "Unbek.8"
|
||||
|
||||
#: src/xz/list.c:76
|
||||
msgid "Unknown-9"
|
||||
msgstr "Unbek.9"
|
||||
|
||||
#: src/xz/list.c:78
|
||||
msgid "Unknown-11"
|
||||
msgstr "Unbek.11"
|
||||
|
||||
#: src/xz/list.c:79
|
||||
msgid "Unknown-12"
|
||||
msgstr "Unbek.12"
|
||||
|
||||
#: src/xz/list.c:80
|
||||
msgid "Unknown-13"
|
||||
msgstr "Unbek.13"
|
||||
|
||||
#: src/xz/list.c:81
|
||||
msgid "Unknown-14"
|
||||
msgstr "Unbek.14"
|
||||
|
||||
#: src/xz/list.c:82
|
||||
msgid "Unknown-15"
|
||||
msgstr "Unbek.15"
|
||||
|
||||
#: src/xz/list.c:126
|
||||
#, c-format
|
||||
msgid "%s: File is empty"
|
||||
msgstr "%s: Datei ist leer"
|
||||
|
||||
#: src/xz/list.c:131
|
||||
#, c-format
|
||||
msgid "%s: Too small to be a valid .xz file"
|
||||
msgstr "%s: Zu klein um ein gültiges .xz file zu sein"
|
||||
|
||||
#. TRANSLATORS: These are column headings. From Strms (Streams)
|
||||
#. to Ratio, the columns are right aligned. Check and Filename
|
||||
#. are left aligned. If you need longer words, it's OK to
|
||||
#. use two lines here. Test with "xz -l foo.xz".
|
||||
#: src/xz/list.c:612
|
||||
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
|
||||
msgstr " Str. Blöcke Kompr. Unkompr. Verh. Check Dateiname"
|
||||
|
||||
#: src/xz/list.c:652
|
||||
#, c-format
|
||||
msgid " Streams: %s\n"
|
||||
msgstr " Ströme: %s\n"
|
||||
|
||||
#: src/xz/list.c:654
|
||||
#, c-format
|
||||
msgid " Blocks: %s\n"
|
||||
msgstr " Blöcke: %s\n"
|
||||
|
||||
#: src/xz/list.c:656
|
||||
#, c-format
|
||||
msgid " Compressed size: %s\n"
|
||||
msgstr " Größe komprimiert: %s\n"
|
||||
|
||||
#: src/xz/list.c:659
|
||||
#, c-format
|
||||
msgid " Uncompressed size: %s\n"
|
||||
msgstr " Größe unkomprimiert: %s\n"
|
||||
|
||||
#: src/xz/list.c:662
|
||||
#, c-format
|
||||
msgid " Ratio: %s\n"
|
||||
msgstr " Verhältnis: %s\n"
|
||||
|
||||
#: src/xz/list.c:664
|
||||
#, c-format
|
||||
msgid " Check: %s\n"
|
||||
msgstr " Check: %s\n"
|
||||
|
||||
#: src/xz/list.c:665
|
||||
#, c-format
|
||||
msgid " Stream padding: %s\n"
|
||||
msgstr " Strom Auffüllung: %s\n"
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All except
|
||||
#. Check are right aligned; Check is left aligned. Test with
|
||||
#. "xz -lv foo.xz".
|
||||
#: src/xz/list.c:693
|
||||
msgid ""
|
||||
" Streams:\n"
|
||||
" Stream Blocks CompOffset UncompOffset CompSize "
|
||||
"UncompSize Ratio Check Padding"
|
||||
msgstr ""
|
||||
" Ströme:\n"
|
||||
" Strom Blöcke KompOffset UnkompOffset KompGröße "
|
||||
"UnkompGröße Verh. Check Auffüllung"
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All
|
||||
#. except Check are right aligned; Check is left aligned.
|
||||
#: src/xz/list.c:748
|
||||
#, c-format
|
||||
msgid ""
|
||||
" Blocks:\n"
|
||||
" Stream Block CompOffset UncompOffset TotalSize "
|
||||
"UncompSize Ratio Check"
|
||||
msgstr ""
|
||||
" Blöcke:\n"
|
||||
" Strom Block KompOffset UnkompOffset TotalGröße "
|
||||
"UnkompGröße Verh. Check"
|
||||
|
||||
#. TRANSLATORS: These are additional column headings
|
||||
#. for the most verbose listing mode. CheckVal
|
||||
#. (Check value), Flags, and Filters are left aligned.
|
||||
#. Header (Block Header Size), CompSize, and MemUsage
|
||||
#. are right aligned. %*s is replaced with 0-120
|
||||
#. spaces to make the CheckVal column wide enough.
|
||||
#. Test with "xz -lvv foo.xz".
|
||||
#: src/xz/list.c:760
|
||||
#, c-format
|
||||
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
|
||||
msgstr " CheckWert %*s Kopf Schalter KompGröße Speicher Filter"
|
||||
|
||||
#: src/xz/list.c:838 src/xz/list.c:1007
|
||||
#, c-format
|
||||
msgid " Memory needed: %s MiB\n"
|
||||
msgstr " Benötigter Speicher: %s MiB\n"
|
||||
|
||||
#: src/xz/list.c:840 src/xz/list.c:1009
|
||||
#, c-format
|
||||
msgid " Sizes in headers: %s\n"
|
||||
msgstr " Größe in Köpfen: %s\n"
|
||||
|
||||
#: src/xz/list.c:841 src/xz/list.c:1010
|
||||
msgid "Yes"
|
||||
msgstr "Ja"
|
||||
|
||||
#: src/xz/list.c:841 src/xz/list.c:1010
|
||||
msgid "No"
|
||||
msgstr "Nein"
|
||||
|
||||
#. TRANSLATORS: %s is an integer. Only the plural form of this
|
||||
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
|
||||
#: src/xz/list.c:986
|
||||
#, c-format
|
||||
msgid "%s file\n"
|
||||
msgid_plural "%s files\n"
|
||||
msgstr[0] "%s Datei\n"
|
||||
msgstr[1] "%s Dateien\n"
|
||||
|
||||
#: src/xz/list.c:999
|
||||
msgid "Totals:"
|
||||
msgstr "Gesamt:"
|
||||
|
||||
#: src/xz/list.c:1000
|
||||
#, c-format
|
||||
msgid " Number of files: %s\n"
|
||||
msgstr " Anzahl Dateien: %s\n"
|
||||
|
||||
#: src/xz/list.c:1072
|
||||
msgid "--list works only on .xz files (--format=xz or --format=auto)"
|
||||
msgstr ""
|
||||
"--list funktioniert nur mit .xz Dateien (--format=xz oder --format=auto)"
|
||||
|
||||
#: src/xz/list.c:1078
|
||||
msgid "--list does not support reading from standard input"
|
||||
msgstr "--list unterstützt kein Lesen der Standardeingabe"
|
||||
|
||||
#: src/xz/main.c:89
|
||||
#, c-format
|
||||
msgid "%s: Error reading filenames: %s"
|
||||
msgstr "%s: Fehler beim Lesen der Dateinamen: %s"
|
||||
|
||||
#: src/xz/main.c:96
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of input when reading filenames"
|
||||
msgstr "%s: Unerwartetes Ende beim Lesen der Dateinamen"
|
||||
|
||||
#: src/xz/main.c:120
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s: Null character found when reading filenames; maybe you meant to use `--"
|
||||
"files0' instead of `--files'?"
|
||||
msgstr ""
|
||||
"%s: Null Charakter gefunden beim Lesen der Dateinamen; Meinten Sie `--"
|
||||
"files0' statt `--files'?"
|
||||
|
||||
#: src/xz/main.c:174
|
||||
msgid "Compression and decompression with --robot are not supported yet."
|
||||
msgstr "Kompression und Dekompression mit --robot ist noch nicht unterstützt."
|
||||
|
||||
#: src/xz/main.c:231
|
||||
msgid ""
|
||||
"Cannot read data from standard input when reading filenames from standard "
|
||||
"input"
|
||||
msgstr ""
|
||||
"Lesen der Standardeingabe ist nicht möglich, wenn die Dateinamen auch von "
|
||||
"der Standardeingabe gelesen werden"
|
||||
|
||||
#: src/xz/message.c:800 src/xz/message.c:844
|
||||
msgid "Internal error (bug)"
|
||||
msgstr "Interner Fehler (Bug)"
|
||||
|
||||
#: src/xz/message.c:807
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr "Kann Signal Routine nicht setzen"
|
||||
|
||||
#: src/xz/message.c:816
|
||||
msgid "No integrity check; not verifying file integrity"
|
||||
msgstr "Kein Integritäts-Check; werde Datei-Integrität nicht überprüfen"
|
||||
|
||||
#: src/xz/message.c:819
|
||||
msgid "Unsupported type of integrity check; not verifying file integrity"
|
||||
msgstr ""
|
||||
"Typ des Integritäts-Checks nicht unterstützt; werde Datei-Integrität nicht "
|
||||
"überprüfen"
|
||||
|
||||
#: src/xz/message.c:826
|
||||
msgid "Memory usage limit reached"
|
||||
msgstr "Speicher-Limit erreicht"
|
||||
|
||||
#: src/xz/message.c:829
|
||||
msgid "File format not recognized"
|
||||
msgstr "Datei Format nicht erkannt"
|
||||
|
||||
#: src/xz/message.c:832
|
||||
msgid "Unsupported options"
|
||||
msgstr "Optionen nicht unterstützt"
|
||||
|
||||
#: src/xz/message.c:835
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr "Komprimierte Daten sind korrupt"
|
||||
|
||||
#: src/xz/message.c:838
|
||||
msgid "Unexpected end of input"
|
||||
msgstr "Unerwartetes Eingabe Ende"
|
||||
|
||||
#: src/xz/message.c:886
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limit is %s."
|
||||
msgstr "%s MiB Speicher wird benötigt. Limit ist %s."
|
||||
|
||||
#: src/xz/message.c:1053
|
||||
#, c-format
|
||||
msgid "%s: Filter chain: %s\n"
|
||||
msgstr "%s: Filter Kette: %s\n"
|
||||
|
||||
#: src/xz/message.c:1063
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Versuchen Sie `%s --help' für mehr Informationen."
|
||||
|
||||
#: src/xz/message.c:1089
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
"Compress or decompress FILEs in the .xz format.\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Benutzung: %s [OPTION]... [DATEI]...\n"
|
||||
"Komprimiert oder dekomprimiert .xz DATEI(EN).\n"
|
||||
"\n"
|
||||
|
||||
#: src/xz/message.c:1096
|
||||
msgid ""
|
||||
"Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr ""
|
||||
"Obligatorische Argumente für lange Optionen sind auch für kurze Optionen\n"
|
||||
"zwingend.\n"
|
||||
|
||||
#: src/xz/message.c:1100
|
||||
msgid " Operation mode:\n"
|
||||
msgstr " Operationsmodus:\n"
|
||||
|
||||
#: src/xz/message.c:1103
|
||||
msgid ""
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
" -t, --test test compressed file integrity\n"
|
||||
" -l, --list list information about .xz files"
|
||||
msgstr ""
|
||||
" -z, --compress erzwinge Komprimierung\n"
|
||||
" -d, --decompress erzwinge Dekomprimierung\n"
|
||||
" -t, --test überprüfe Datei Integrität\n"
|
||||
" -l, --list liste Datei Informationen"
|
||||
|
||||
#: src/xz/message.c:1109
|
||||
msgid ""
|
||||
"\n"
|
||||
" Operation modifiers:\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Operationsmodifikatoren:\n"
|
||||
|
||||
#: src/xz/message.c:1112
|
||||
msgid ""
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
" -c, --stdout write to standard output and don't delete input files"
|
||||
msgstr ""
|
||||
" -k, --keep Eingabedateien beibehalten (nicht löschen)\n"
|
||||
" -f, --force erzwinge Überschreiben der Ausgabedatei und\n"
|
||||
" (de)komprimiere Verweise (Links)\n"
|
||||
" -c, --stdout schreibe nach Standard Output und lösche nicht die\n"
|
||||
" Eingabedateien"
|
||||
|
||||
#: src/xz/message.c:1118
|
||||
msgid ""
|
||||
" --no-sparse do not create sparse files when decompressing\n"
|
||||
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
" --files[=FILE] read filenames to process from FILE; if FILE is\n"
|
||||
" omitted, filenames are read from the standard input;\n"
|
||||
" filenames must be terminated with the newline "
|
||||
"character\n"
|
||||
" --files0[=FILE] like --files but use the null character as terminator"
|
||||
msgstr ""
|
||||
" --no-sparse erzeuge keine sparse Datei beim Dekomprimieren\n"
|
||||
" -S, --suffix=.SUF benutze `.SUF' Endung für komprimierte Dateien\n"
|
||||
" --files=[DATEI] lese zu verarbeitende Dateinamen von DATEI; falls\n"
|
||||
" DATEI nicht angegeben wurde, werden Dateinamen\n"
|
||||
" von Standard Input gelesen. Dateinamen müssen mit\n"
|
||||
" einem Zeilenumbruch voneinander getrennt werden\n"
|
||||
" --files0=[DATEI] wie --files, aber benutze den Null Charakter als "
|
||||
"Trenner"
|
||||
|
||||
#: src/xz/message.c:1126
|
||||
msgid ""
|
||||
"\n"
|
||||
" Basic file format and compression options:\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Grundlegende Optionen für Dateiformat und Kompression:\n"
|
||||
|
||||
#: src/xz/message.c:1128
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', and `raw'\n"
|
||||
" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
|
||||
" `crc32', `crc64' (default), or `sha256'"
|
||||
msgstr ""
|
||||
" -F, --format=FMT Dateiformat zur Kodierung oder Dekodierung; "
|
||||
"mögliche\n"
|
||||
" Werte sind `auto' (Voreinstellung), `xz', `lzma' "
|
||||
"und\n"
|
||||
" `raw'\n"
|
||||
" -C, --check=CHECK Typ des Integritätschecks: `none' (Vorsicht), "
|
||||
"`crc32',\n"
|
||||
" `crc64' (Voreinstellung), oder `sha256'"
|
||||
|
||||
#: src/xz/message.c:1135
|
||||
msgid ""
|
||||
" -0 ... -9 compression preset; default is 6; take compressor "
|
||||
"*and*\n"
|
||||
" decompressor memory usage into account before using 7-"
|
||||
"9!"
|
||||
msgstr ""
|
||||
" -0 .. -9 Kompressionseinstellung; Voreinstellung is 6. "
|
||||
"Beachten\n"
|
||||
" Sie den Speicherverbrauch des Komprimieres *und* "
|
||||
"des\n"
|
||||
" Dekomprimierers, wenn Sie 7-9 benutzen!"
|
||||
|
||||
#: src/xz/message.c:1139
|
||||
msgid ""
|
||||
" -e, --extreme try to improve compression ratio by using more CPU "
|
||||
"time;\n"
|
||||
" does not affect decompressor memory requirements"
|
||||
msgstr ""
|
||||
" -e, --extreme Versuche durch stärkere CPU Nutzung das "
|
||||
"Kompressions-\n"
|
||||
" verhältnis zu verbessern. Das beeinflusst nicht den\n"
|
||||
" Speicherbedarf des Dekomprimierers."
|
||||
|
||||
#: src/xz/message.c:1144
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT\n"
|
||||
" set memory usage limit for compression, "
|
||||
"decompression,\n"
|
||||
" or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
|
||||
msgstr ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT Setze Speicher Nutzungslimit für Kompression,\n"
|
||||
" Dekompression, oder beides; LIMIT ist in bytes, % "
|
||||
"RAM,\n"
|
||||
" oder 0 für Grundeinstellungen."
|
||||
|
||||
#: src/xz/message.c:1151
|
||||
msgid ""
|
||||
" --no-adjust if compression settings exceed the memory usage "
|
||||
"limit,\n"
|
||||
" give an error instead of adjusting the settings "
|
||||
"downwards"
|
||||
msgstr ""
|
||||
" --no-adjust Wenn die Kompressionseinstellungen das Speicher\n"
|
||||
" Nutzungslimit übersteigen, erzeuge einen Fehler "
|
||||
"statt\n"
|
||||
" die Einstellungen nach unten anzupassen."
|
||||
|
||||
#: src/xz/message.c:1157
|
||||
msgid ""
|
||||
"\n"
|
||||
" Custom filter chain for compression (alternative for using presets):"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" User-definierte Filter Kette für Kompression (alternativ zu Voreinstellung):"
|
||||
|
||||
#: src/xz/message.c:1166
|
||||
msgid ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero "
|
||||
"or\n"
|
||||
" --lzma2[=OPTS] more of the following options (valid values; "
|
||||
"default):\n"
|
||||
" preset=PRE reset options to a preset (0-9[e])\n"
|
||||
" dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n"
|
||||
" lc=NUM number of literal context bits (0-4; 3)\n"
|
||||
" lp=NUM number of literal position bits (0-4; 0)\n"
|
||||
" pb=NUM number of position bits (0-4; 2)\n"
|
||||
" mode=MODE compression mode (fast, normal; normal)\n"
|
||||
" nice=NUM nice length of a match (2-273; 64)\n"
|
||||
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; "
|
||||
"bt4)\n"
|
||||
" depth=NUM maximum search depth; 0=automatic "
|
||||
"(default)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --lzma1[=OPTIONEN] LZMA1 oder LZMA2; OPTIONEN ist eine durch Kommata\n"
|
||||
" --lzma2[=OPTIONEN] getrennte Liste bestehend aus den folgenden "
|
||||
"Optionen\n"
|
||||
" (zulässige Werte; Voreinstellung):\n"
|
||||
" preset=NUM Setze Optionen zurück zu "
|
||||
"Voreinstellung\n"
|
||||
" (0-9[e])\n"
|
||||
" dict=NUM Wörterbuch Größe (4 KiB - 1536 MiB; 8 "
|
||||
"MiB)\n"
|
||||
" lc=NUM Anzahl der Literal Kontext Bits (0-4; "
|
||||
"3)\n"
|
||||
" lp=NUM Anzahl der Literal Positionsbits (0-4; "
|
||||
"0)\n"
|
||||
" pb=NUM Anzahl der Positionsbits (0-4; 2)\n"
|
||||
" mode=MODUS Kompressionsmodus (fast, normal; "
|
||||
"normal)\n"
|
||||
" nice=NUM Nice-Länge eines Treffers (2-273; 64)\n"
|
||||
" mf=NAME Algorithmus zum Auffinden von\n"
|
||||
" Übereinstimmungen (hc3, hc4, bt2, bt3, "
|
||||
"bt4;\n"
|
||||
" bt4)\n"
|
||||
" depth=NUM Maximale Suchtiefe; 0=automatisch\n"
|
||||
" (Voreinstellung)"
|
||||
|
||||
#: src/xz/message.c:1181
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
|
||||
" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
|
||||
" --arm[=OPTS] ARM BCJ filter (little endian only)\n"
|
||||
" --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
|
||||
" --sparc[=OPTS] SPARC BCJ filter\n"
|
||||
" Valid OPTS for all BCJ filters:\n"
|
||||
" start=NUM start offset for conversions (default=0)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --x86[=OPTIONEN] x86 BCJ Filter (32-bit und 64-bit)\n"
|
||||
" --powerpc[=OPTIONEN] PowerPC BCJ Filter (nur big endian)\n"
|
||||
" --ia64[=OPTIONEN] IA64 (Itanium) BCJ Filter\n"
|
||||
" --arm[=OPTIONEN] ARM BCJ Filter (nur little endian)\n"
|
||||
" --armthumb[=OPTIONEN] ARM-Thumb BCJ Filter (nur little endian)\n"
|
||||
" --sparc[=OPTIONEN] SPARC BCJ Filter\n"
|
||||
" Zulässige Optionen für alle BCJ Filter:\n"
|
||||
" start=NUM Start-Offset für Konversion\n"
|
||||
" (Voreinstellung=0)"
|
||||
|
||||
#: src/xz/message.c:1193
|
||||
msgid ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
|
||||
" dist=NUM distance between bytes being subtracted\n"
|
||||
" from each other (1-256; 1)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --delta[=OPTIONEN] Delta Filter; zulässige Optionen (gültige Werte;\n"
|
||||
" Voreinstellung):\n"
|
||||
" dist=NUM Abstand zwischen den Bytes, die "
|
||||
"voneinander\n"
|
||||
" subtrahiert werden (1-256; 1)"
|
||||
|
||||
#: src/xz/message.c:1201
|
||||
msgid ""
|
||||
"\n"
|
||||
" Other options:\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Andere Optionen:\n"
|
||||
|
||||
#: src/xz/message.c:1204
|
||||
msgid ""
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors "
|
||||
"too\n"
|
||||
" -v, --verbose be verbose; specify twice for even more verbose"
|
||||
msgstr ""
|
||||
" -q, --quiet unterdrücke Warnungen; benutze diese Option zweimal\n"
|
||||
" um auch Fehlermeldungen zu unterdrücken\n"
|
||||
" -v, --verbose sei gesprächig; benutze diese Option zweimal um "
|
||||
"noch\n"
|
||||
" gesprächiger zu sein"
|
||||
|
||||
#: src/xz/message.c:1209
|
||||
msgid " -Q, --no-warn make warnings not affect the exit status"
|
||||
msgstr " -Q, --no-warn Warnungen verändern nicht den exit status"
|
||||
|
||||
#: src/xz/message.c:1211
|
||||
msgid ""
|
||||
" --robot use machine-parsable messages (useful for scripts)"
|
||||
msgstr ""
|
||||
" --robot benutze Maschinen-lesbare Meldungen (nützlich für\n"
|
||||
" Skripte)"
|
||||
|
||||
#: src/xz/message.c:1214
|
||||
msgid ""
|
||||
" --info-memory display the total amount of RAM and the currently "
|
||||
"active\n"
|
||||
" memory usage limits, and exit"
|
||||
msgstr " --info-memory zeige Speicherlimit an und terminiere"
|
||||
|
||||
#: src/xz/message.c:1217
|
||||
msgid ""
|
||||
" -h, --help display the short help (lists only the basic options)\n"
|
||||
" -H, --long-help display this long help and exit"
|
||||
msgstr ""
|
||||
" -h, --help zeige kurze Hilfe and (zeigt nur die grundlegenden\n"
|
||||
" Optionen)\n"
|
||||
" -H, --long-help zeige diese lange Hilfe an und terminiere"
|
||||
|
||||
#: src/xz/message.c:1221
|
||||
msgid ""
|
||||
" -h, --help display this short help and exit\n"
|
||||
" -H, --long-help display the long help (lists also the advanced options)"
|
||||
msgstr ""
|
||||
" -h, --help zeige diese kurze Hilfe an und terminiere\n"
|
||||
" -H, --long-help zeige die lange Hilfe an (zeigt auch "
|
||||
"fortgeschrittene\n"
|
||||
" Optionen an)"
|
||||
|
||||
#: src/xz/message.c:1226
|
||||
msgid " -V, --version display the version number and exit"
|
||||
msgstr " -V, --version zeige Versionsnummer an und terminiere"
|
||||
|
||||
#: src/xz/message.c:1228
|
||||
msgid ""
|
||||
"\n"
|
||||
"With no FILE, or when FILE is -, read standard input.\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Wenn DATEI nicht angegeben wurde, oder DATEI gleich - ist, dann wird von\n"
|
||||
"der Standardeingabe gelesen.\n"
|
||||
|
||||
#. TRANSLATORS: This message indicates the bug reporting address
|
||||
#. for this package. Please add _another line_ saying
|
||||
#. "Report translation bugs to <...>\n" with the email or WWW
|
||||
#. address for translation bugs. Thanks.
|
||||
#: src/xz/message.c:1234
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr ""
|
||||
"Melde Bugs an <%s> (in englisch oder finnisch).\n"
|
||||
"Melde Übersetzungsfehler an <maan@systemlinux.org> (in englisch oder "
|
||||
"deutsch).\n"
|
||||
|
||||
#: src/xz/message.c:1236
|
||||
#, c-format
|
||||
msgid "%s home page: <%s>\n"
|
||||
msgstr "%s Homepage: <%s>\n"
|
||||
|
||||
#: src/xz/options.c:86
|
||||
#, c-format
|
||||
msgid "%s: Options must be `name=value' pairs separated with commas"
|
||||
msgstr ""
|
||||
"%s: Optionen müssen in der Form `Name=Wert` gegeben werden, getrennt durch "
|
||||
"Kommata"
|
||||
|
||||
#: src/xz/options.c:93
|
||||
#, c-format
|
||||
msgid "%s: Invalid option name"
|
||||
msgstr "%s: Ungültige Option"
|
||||
|
||||
#: src/xz/options.c:113
|
||||
#, c-format
|
||||
msgid "%s: Invalid option value"
|
||||
msgstr "%s: Ungültiger Wert für Option"
|
||||
|
||||
#: src/xz/options.c:247
|
||||
#, c-format
|
||||
msgid "Unsupported LZMA1/LZMA2 preset: %s"
|
||||
msgstr "LZMA1/LZMA2 Voreinstellung ist ungültig: %s"
|
||||
|
||||
#: src/xz/options.c:355
|
||||
msgid "The sum of lc and lp must not exceed 4"
|
||||
msgstr "Die Summe aus lc und lp darf höchstens 4 sein"
|
||||
|
||||
#: src/xz/options.c:359
|
||||
#, c-format
|
||||
msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
msgstr ""
|
||||
"Der ausgewählte Algorithmus zum Auffinden von Übereinstimmungen braucht "
|
||||
"mindestens nice=%<PRIu32>"
|
||||
|
||||
#: src/xz/suffix.c:79 src/xz/suffix.c:164
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr ""
|
||||
"%s: Mit --format=raw ist --sufix=.SUF notwendig, falls nicht nach stdout "
|
||||
"geschrieben wird"
|
||||
|
||||
#: src/xz/suffix.c:99
|
||||
#, c-format
|
||||
msgid "%s: Filename has an unknown suffix, skipping"
|
||||
msgstr "%s: Dateiname hat unbekannte Endung, überspringe"
|
||||
|
||||
#: src/xz/suffix.c:154
|
||||
#, c-format
|
||||
msgid "%s: File already has `%s' suffix, skipping"
|
||||
msgstr "%s: Datei hat bereits `%s' Endung, überspringe"
|
||||
|
||||
#: src/xz/suffix.c:205
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename suffix"
|
||||
msgstr "%s: Ungültige Datei Endung"
|
||||
|
||||
#: src/xz/util.c:61
|
||||
#, c-format
|
||||
msgid "%s: Value is not a non-negative decimal integer"
|
||||
msgstr "%s: Wert ist keine nicht-negative ganze Zahl"
|
||||
|
||||
#: src/xz/util.c:103
|
||||
#, c-format
|
||||
msgid "%s: Invalid multiplier suffix"
|
||||
msgstr "%s: Ungültige Einheit"
|
||||
|
||||
#: src/xz/util.c:105
|
||||
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
|
||||
msgstr "Gültige Einheiten sind `KiB' (2^10), `MiB' (2^20), und `GiB' (2^30)."
|
||||
|
||||
#: src/xz/util.c:122
|
||||
#, c-format
|
||||
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
|
||||
msgstr "Wert der Option `%s' muss im Bereich [%<PRIu64>, %<PRIu64>] sein"
|
||||
|
||||
#: src/xz/util.c:247
|
||||
msgid "Empty filename, skipping"
|
||||
msgstr "Leere Dateiname, überspringe"
|
||||
|
||||
#: src/xz/util.c:261
|
||||
msgid "Compressed data cannot be read from a terminal"
|
||||
msgstr "Komprimierte Daten können nicht vom Terminal gelesen werden"
|
||||
|
||||
#: src/xz/util.c:274
|
||||
msgid "Compressed data cannot be written to a terminal"
|
||||
msgstr "Komprimierte Daten können nicht auf das Terminal geschrieben werden"
|
||||
|
||||
#: src/common/tuklib_exit.c:39
|
||||
msgid "Writing to standard output failed"
|
||||
msgstr "Schreiben auf die Standardausgabe fehlgeschlagen"
|
||||
|
||||
#: src/common/tuklib_exit.c:42
|
||||
msgid "Unknown error"
|
||||
msgstr "Unbekannter Fehler"
|
||||
446
po/fi.po
446
po/fi.po
@@ -1,446 +0,0 @@
|
||||
# translation of fi.po to Finnish
|
||||
# This file is put in the public domain.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: fi\n"
|
||||
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
|
||||
"POT-Creation-Date: 2007-12-10 14:34+0200\n"
|
||||
"PO-Revision-Date: 2007-08-09 22:14+0300\n"
|
||||
"Last-Translator: Lasse Collin <lasse.collin@tukaani.org>\n"
|
||||
"Language-Team: Finnish\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: src/lzma/help.c:28
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Lisätietoja saa komennolla \"%s --help\"."
|
||||
|
||||
#: src/lzma/help.c:36
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
"Compress or decompress FILEs in the .lzma format.\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Käyttö: %s [VALITSIN]... [TIEDOSTO]...\n"
|
||||
"Pakkaa tai purkaa .lzma-muotoiset TIEDOSTOt\n"
|
||||
"\n"
|
||||
|
||||
#: src/lzma/help.c:40
|
||||
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr "Pitkien valitsinten pakolliset argumentit ovat pakollisia myös lyhyille.\n"
|
||||
|
||||
#: src/lzma/help.c:44
|
||||
msgid ""
|
||||
" Operation mode:\n"
|
||||
"\n"
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
" -t, --test test compressed file integrity\n"
|
||||
" -l, --list list block sizes, total sizes, and possible metadata\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/help.c:53
|
||||
msgid ""
|
||||
" Operation modifiers:\n"
|
||||
"\n"
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
" -c, --stdout write to standard output and don't delete input files\n"
|
||||
" -S, --suffix=.SUF use suffix `.SUF' on compressed files instead of `.lzma'\n"
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto', `native', `single', `multi', and `alone'\n"
|
||||
" --files=[FILE] read filenames to process from FILE; if FILE is\n"
|
||||
" omitted, filenames are read from the standard input;\n"
|
||||
" filenames must be terminated with the newline character\n"
|
||||
" --files0=[FILE] like --files but use the nul byte as terminator\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/help.c:68
|
||||
msgid ""
|
||||
" Compression presets and basic compression options:\n"
|
||||
"\n"
|
||||
" -1 .. -2 fast compression\n"
|
||||
" -3 .. -6 good compression\n"
|
||||
" -7 .. -9 excellent compression, but needs a lot of memory;\n"
|
||||
" default is -7 if memory limit allows\n"
|
||||
"\n"
|
||||
" -C, --check=CHECK integrity check type: `crc32', `crc64' (default),\n"
|
||||
" or `sha256'\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/help.c:80
|
||||
msgid ""
|
||||
" Custom filter chain for compression (alternative for using presets):\n"
|
||||
"\n"
|
||||
" --lzma=[OPTS] LZMA filter; OPTS is a comma-separated list of zero or\n"
|
||||
" more of the following options (valid values; default):\n"
|
||||
" dict=NUM dictionary size in bytes (1 - 1Gi; 8Mi)\n"
|
||||
" lc=NUM number of literal context bits (0-8; 3)\n"
|
||||
" lp=NUM number of literal position bits (0-4; 0)\n"
|
||||
" pb=NUM number of position bits (0-4; 2)\n"
|
||||
" mode=MODE compression mode (`fast' or `best'; `best')\n"
|
||||
" fb=NUM number of fast bytes (5-273; 128)\n"
|
||||
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
|
||||
" mfc=NUM match finder cycles; 0=automatic (default)\n"
|
||||
"\n"
|
||||
" --x86 x86 filter (sometimes called BCJ filter)\n"
|
||||
" --powerpc PowerPC (big endian) filter\n"
|
||||
" --ia64 IA64 (Itanium) filter\n"
|
||||
" --arm ARM filter\n"
|
||||
" --armthumb ARM-Thumb filter\n"
|
||||
" --sparc SPARC filter\n"
|
||||
"\n"
|
||||
" --copy No filtering (useful only when specified alone)\n"
|
||||
" --subblock=[OPTS] Subblock filter; valid OPTS (valid values; default):\n"
|
||||
" size=NUM number of bytes of data per subblock\n"
|
||||
" (1 - 256Mi; 4Ki)\n"
|
||||
" rle=NUM run-length encoder chunk size (0-256; 0)\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/help.c:120
|
||||
msgid ""
|
||||
" Resource usage options:\n"
|
||||
"\n"
|
||||
" -M, --memory=NUM use roughly NUM bytes of memory at maximum\n"
|
||||
" -T, --threads=NUM use at maximum of NUM (de)compression threads\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/help.c:129
|
||||
msgid ""
|
||||
" Other options:\n"
|
||||
"\n"
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
|
||||
" -v, --verbose be verbose; specify twice for even more verbose\n"
|
||||
"\n"
|
||||
" -h, --help display this help and exit\n"
|
||||
" -V, --version display version and license information and exit\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/help.c:137
|
||||
msgid "With no FILE, or when FILE is -, read standard input.\n"
|
||||
msgstr "Jos TIEDOSTOa ei ole annettu, tai se on \"-\", luetaan vakiosyötettä.\n"
|
||||
|
||||
#: src/lzma/help.c:143
|
||||
msgid "On this system and configuration, the tool will use"
|
||||
msgstr "Tässä järjestelmässä näillä asetuksilla, tämä työkalu käyttää"
|
||||
|
||||
#: src/lzma/help.c:144
|
||||
#, c-format
|
||||
msgid " * roughly %zu MiB of memory at maximum; and\n"
|
||||
msgstr " * korkeintaan %zu MiB keskusmuistia (suurpiirteinen rajoitus); ja\n"
|
||||
|
||||
#: src/lzma/help.c:147
|
||||
msgid ""
|
||||
" * at maximum of one thread for (de)compression.\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
" * korkeintaan yhtä säiettä pakkaukseen tai purkuun.\n"
|
||||
"\n"
|
||||
|
||||
#: src/lzma/help.c:151
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr ""
|
||||
"Lähetä raportit ohjelmistovioista (englanniksi tai suomeksi)\n"
|
||||
"osoitteeseen <%s>.\n"
|
||||
|
||||
#: src/lzma/args.c:128
|
||||
msgid "Maximum number of filters is seven"
|
||||
msgstr "Suotimia voi olla korkeintaan seitsemän"
|
||||
|
||||
#: src/lzma/args.c:193
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename suffix"
|
||||
msgstr "%s: Virheellinen tiedostonimen pääte"
|
||||
|
||||
#: src/lzma/args.c:327
|
||||
#, c-format
|
||||
msgid "%s: Unknown file format type"
|
||||
msgstr "%s: Tuntematon tiedostomuodon tyyppi"
|
||||
|
||||
#: src/lzma/args.c:353
|
||||
#, c-format
|
||||
msgid "%s: Unknown integrity check type"
|
||||
msgstr "%s: Tuntematon eheystarkisteen tyyppi"
|
||||
|
||||
#: src/lzma/args.c:371
|
||||
msgid "Only one file can be specified with `--files'or `--files0'."
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/args.c:421
|
||||
msgid "The environment variable LZMA_OPT contains too many arguments"
|
||||
msgstr "Ympäristömuuttuja LZMA_OPT sisältää liian monta argumenttia"
|
||||
|
||||
#: src/lzma/args.c:485
|
||||
msgid "Memory usage limit is too small for any internal filter preset"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/args.c:500
|
||||
msgid "Memory usage limit is too small for the given filter setup"
|
||||
msgstr "Muistinkäyttörajoitus on liian pieni annetuille suodinasetusille"
|
||||
|
||||
#: src/lzma/error.c:35
|
||||
msgid "Operation successful"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/error.c:38
|
||||
msgid "Operation finished successfully"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/error.c:41 src/lzma/error.c:153
|
||||
msgid "Internal error (bug)"
|
||||
msgstr "Sisäinen virhe (bugi)"
|
||||
|
||||
#: src/lzma/error.c:44
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr "Pakattu data on korruptoitunut"
|
||||
|
||||
#: src/lzma/error.c:50
|
||||
msgid "Unexpected end of input"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/error.c:53
|
||||
msgid "Unsupported options"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/error.c:56
|
||||
msgid "Unsupported integrity check type"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/error.c:87 src/lzma/error.c:93
|
||||
#, c-format
|
||||
msgid "Writing to standard output failed: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/io.c:81
|
||||
#, c-format
|
||||
msgid "Cannot get file descriptor of the current directory: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/io.c:123 src/lzma/util.c:127
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename"
|
||||
msgstr "%s: Virheellinen tiedostonimi"
|
||||
|
||||
#: src/lzma/io.c:130 src/lzma/io.c:233
|
||||
#, c-format
|
||||
msgid "Cannot change directory: %s"
|
||||
msgstr "Hakemiston vaihtaminen epäonnistui: %s"
|
||||
|
||||
#: src/lzma/io.c:135
|
||||
#, c-format
|
||||
msgid "%s: File seems to be moved, not removing"
|
||||
msgstr "%s: Tiedosto näyttää olevan siirretty, ei poisteta"
|
||||
|
||||
#: src/lzma/io.c:141
|
||||
#, c-format
|
||||
msgid "%s: Cannot remove: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/io.c:164
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file owner: %s"
|
||||
msgstr "%s: Tiedoston omistajuuden asetus epäonnistui: %s"
|
||||
|
||||
#: src/lzma/io.c:170
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file group: %s"
|
||||
msgstr "%s: Tiedoston ryhmän asetus epäonnistui: %s"
|
||||
|
||||
#: src/lzma/io.c:189
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file permissions: %s"
|
||||
msgstr "%s: Tiedoston oikeuksien asetus epäonnistui: %s"
|
||||
|
||||
#: src/lzma/io.c:252
|
||||
#, c-format
|
||||
msgid "%s: Cannot open the directory containing the file: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/io.c:313
|
||||
#, c-format
|
||||
msgid "%s: Is a symbolic link, skipping"
|
||||
msgstr "%s: Symbolinen linkki, ohitetaan"
|
||||
|
||||
#: src/lzma/io.c:330
|
||||
#, c-format
|
||||
msgid "%s: Is a directory, skipping"
|
||||
msgstr "%s: Hakemisto, ohitetaan"
|
||||
|
||||
#: src/lzma/io.c:337 src/lzma/list.c:445
|
||||
#, c-format
|
||||
msgid "%s: Not a regular file, skipping"
|
||||
msgstr "%s: Ei ole tavallinen tiedosto, ohitetaan"
|
||||
|
||||
#: src/lzma/io.c:348
|
||||
#, c-format
|
||||
msgid "%s: File has setuid or setgid bit set, skipping"
|
||||
msgstr "%s: Tiedostolla on setuid- tai setgid-bitti asetettuna, ohitetaan"
|
||||
|
||||
#: src/lzma/io.c:355
|
||||
#, c-format
|
||||
msgid "%s: File has sticky bit set, skipping"
|
||||
msgstr "%s: Tiedostolla on sticky-bitti asetettuna, ohitetaan"
|
||||
|
||||
#: src/lzma/io.c:362
|
||||
#, c-format
|
||||
msgid "%s: Input file has more than one hard link, skipping"
|
||||
msgstr "%s: Tiedostoon viittaa useampi kuin yksi linkki, ohitetaan"
|
||||
|
||||
#: src/lzma/io.c:390 src/lzma/io.c:468
|
||||
#, c-format
|
||||
msgid "%s: Closing the file failed: %s"
|
||||
msgstr "%s: Tiedoston sulkeminen epäonnistui: %s"
|
||||
|
||||
#: src/lzma/io.c:611
|
||||
#, c-format
|
||||
msgid "%s: Read error: %s"
|
||||
msgstr "%s: Lukeminen epäonnistui: %s"
|
||||
|
||||
#: src/lzma/io.c:654
|
||||
#, c-format
|
||||
msgid "%s: Write error: %s"
|
||||
msgstr "%s: Kirjoitus epäonnistui: %s"
|
||||
|
||||
#: src/lzma/list.c:451
|
||||
#, c-format
|
||||
msgid "%s: File is empty"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/main.c:57
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr "Signaalikäsittelijöiden asetus epäonnistui"
|
||||
|
||||
#: src/lzma/main.c:75
|
||||
msgid "Compressed data not read from a terminal."
|
||||
msgstr "Pakattua dataa ei lueta päätteeltä."
|
||||
|
||||
#: src/lzma/main.c:77 src/lzma/main.c:92
|
||||
msgid "Use `--force' to force decompression."
|
||||
msgstr "Käytä valitsinta \"--force\" pakottaaksesi purun."
|
||||
|
||||
#: src/lzma/main.c:90
|
||||
msgid "Compressed data not written to a terminal."
|
||||
msgstr "Pakattua dataa ei kirjoiteta päätteelle."
|
||||
|
||||
#: src/lzma/main.c:117
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: Error reading filenames: %s"
|
||||
msgstr "%s: Tiedoston sulkeminen epäonnistui: %s"
|
||||
|
||||
#: src/lzma/main.c:122
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of input when reading filenames"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/main.c:212
|
||||
msgid "Cannot read data from standard input when reading filenames from standard input"
|
||||
msgstr "Dataa ei voida lukea oletussyötteestä, kun tiedostonimiä luetaan oletussyötteestä"
|
||||
|
||||
#: src/lzma/options.c:83
|
||||
#, c-format
|
||||
msgid "%s: Options must be `name=value' pairs separated with commas"
|
||||
msgstr "%s: Asetusten tulee olla \"nimi=arvo\"-pareja, jotka on eroteltu pilkuilla"
|
||||
|
||||
#: src/lzma/options.c:111
|
||||
#, c-format
|
||||
msgid "%s: Invalid option value"
|
||||
msgstr "%s: Virheellinen asetuksen arvo"
|
||||
|
||||
#: src/lzma/options.c:124
|
||||
#, c-format
|
||||
msgid "%s: Invalid option name"
|
||||
msgstr "%s: Virheellinen asetuksen nimi"
|
||||
|
||||
#: src/lzma/process.c:142
|
||||
#, c-format
|
||||
msgid "Cannot create a thread: %s"
|
||||
msgstr "Säikeen luonti epäonnistui: %s"
|
||||
|
||||
#: src/lzma/suffix.c:85
|
||||
#, c-format
|
||||
msgid "%s: Filename has an unknown suffix, skipping"
|
||||
msgstr "%s: Tiedostonimellä on tuntematon pääte, ohitetaan"
|
||||
|
||||
#: src/lzma/suffix.c:114
|
||||
#, c-format
|
||||
msgid "%s: File already has `%s' suffix, skipping"
|
||||
msgstr "%s: Tiedostolla on jo \"%s\"-pääte, ohitetaan"
|
||||
|
||||
#: src/lzma/util.c:44
|
||||
#, c-format
|
||||
msgid "%s: Value is not a non-negative decimal integer"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/util.c:84
|
||||
#, c-format
|
||||
msgid "%s: Invalid multiplier suffix. Valid suffixes:"
|
||||
msgstr ""
|
||||
|
||||
#: src/lzma/util.c:105
|
||||
#, c-format
|
||||
msgid "Value of the option `%s' must be in the range [%llu, %llu]"
|
||||
msgstr "Asetuksen \"%s\" arvon tulee olla välillä [%llu, %llu]"
|
||||
|
||||
#: src/lzma/util.c:177
|
||||
msgid "Empty filename, skipping"
|
||||
msgstr "Tyhjä tiedostonimi, ohitetaan"
|
||||
|
||||
#: lib/getopt.c:531 lib/getopt.c:547
|
||||
#, c-format
|
||||
msgid "%s: option `%s' is ambiguous\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/getopt.c:580 lib/getopt.c:584
|
||||
#, c-format
|
||||
msgid "%s: option `--%s' doesn't allow an argument\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/getopt.c:593 lib/getopt.c:598
|
||||
#, c-format
|
||||
msgid "%s: option `%c%s' doesn't allow an argument\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/getopt.c:641 lib/getopt.c:660 lib/getopt.c:976 lib/getopt.c:995
|
||||
#, c-format
|
||||
msgid "%s: option `%s' requires an argument\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/getopt.c:698 lib/getopt.c:701
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `--%s'\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/getopt.c:709 lib/getopt.c:712
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `%c%s'\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/getopt.c:764 lib/getopt.c:767
|
||||
#, c-format
|
||||
msgid "%s: illegal option -- %c\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/getopt.c:773 lib/getopt.c:776
|
||||
#, c-format
|
||||
msgid "%s: invalid option -- %c\n"
|
||||
msgstr "%s: virheellinen valitsin -- %c\n"
|
||||
|
||||
#: lib/getopt.c:828 lib/getopt.c:844 lib/getopt.c:1048 lib/getopt.c:1066
|
||||
#, c-format
|
||||
msgid "%s: option requires an argument -- %c\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/getopt.c:897 lib/getopt.c:913
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' is ambiguous\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/getopt.c:937 lib/getopt.c:955
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' doesn't allow an argument\n"
|
||||
msgstr ""
|
||||
864
po/fr.po
Normal file
864
po/fr.po
Normal file
@@ -0,0 +1,864 @@
|
||||
# XZ Utils French Translation
|
||||
# This file is put in the public domain.
|
||||
# Adrien Nader <camaradetux@gmail.com>, 2011.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz-utils\n"
|
||||
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
|
||||
"POT-Creation-Date: 2011-05-21 14:35+0200\n"
|
||||
"PO-Revision-Date: 2010-09-24 21;12+0200\n"
|
||||
"Last-Translator: Adrien Nader <camaradetux@gmail.com>\n"
|
||||
"Language-Team: None\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n==1) ? 0 : 1;\n"
|
||||
|
||||
#: src/xz/args.c:338
|
||||
#, c-format
|
||||
msgid "%s: Unknown file format type"
|
||||
msgstr "%s : Format de fichier inconnu"
|
||||
|
||||
#: src/xz/args.c:361 src/xz/args.c:369
|
||||
#, c-format
|
||||
msgid "%s: Unsupported integrity check type"
|
||||
msgstr "%s : Type de vérification d'intégrité inconnu"
|
||||
|
||||
#: src/xz/args.c:396
|
||||
msgid "Only one file can be specified with `--files' or `--files0'."
|
||||
msgstr "Un seul fichier peut être spécifié avec `--files' ou `--files0'."
|
||||
|
||||
#: src/xz/args.c:459
|
||||
#, c-format
|
||||
msgid "The environment variable %s contains too many arguments"
|
||||
msgstr "La variable d'environnement %s contient trop d'arguments"
|
||||
|
||||
#: src/xz/coder.c:105
|
||||
msgid "Maximum number of filters is four"
|
||||
msgstr "Le nombre maximal de filtres est quatre"
|
||||
|
||||
#: src/xz/coder.c:118
|
||||
msgid "Memory usage limit is too low for the given filter setup."
|
||||
msgstr "La limite d'utilisation mémoire est trop basse pour la configuration de filtres donnée."
|
||||
|
||||
#: src/xz/coder.c:148
|
||||
msgid "Using a preset in raw mode is discouraged."
|
||||
msgstr "Utiliser un préréglage en mode `raw' est déconseillé."
|
||||
|
||||
#: src/xz/coder.c:150
|
||||
msgid "The exact options of the presets may vary between software versions."
|
||||
msgstr "Le détail des préréglages peut varier entre différentes versions du logiciel."
|
||||
|
||||
#: src/xz/coder.c:176
|
||||
msgid "The .lzma format supports only the LZMA1 filter"
|
||||
msgstr "Le format .lzma ne prend en charge que le filtre LZMA1"
|
||||
|
||||
#: src/xz/coder.c:184
|
||||
msgid "LZMA1 cannot be used with the .xz format"
|
||||
msgstr "Le filtre LZMA1 ne peut être utilisé avec le format .xz"
|
||||
|
||||
#: src/xz/coder.c:203
|
||||
#, c-format
|
||||
msgid "Using up to %<PRIu32> threads."
|
||||
msgstr "Jusqu'à %<PRIu32> threads seront utilisés."
|
||||
|
||||
#: src/xz/coder.c:216
|
||||
msgid "Unsupported filter chain or filter options"
|
||||
msgstr "Enchaînement ou options de filtres non pris en charge"
|
||||
|
||||
#: src/xz/coder.c:224
|
||||
#, c-format
|
||||
msgid "Decompression will need %s MiB of memory."
|
||||
msgstr "La décompression nécessitera %s MiB de mémoire."
|
||||
|
||||
#: src/xz/coder.c:259
|
||||
#, c-format
|
||||
msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "Nombre de threads réduit de %s à %s pour ne pas dépasser la limite d'utilisation mémoire de %s MiB"
|
||||
|
||||
#: src/xz/coder.c:313
|
||||
#, c-format
|
||||
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "Taille du dictionnaire LZMA%c réduite de %s MiB à %s MiB pour ne pas dépasser la limite d'utilisation mémoire de %s MiB"
|
||||
|
||||
#. TRANSLATORS: When compression or decompression finishes,
|
||||
#. and xz is going to remove the source file, xz first checks
|
||||
#. if the source file still exists, and if it does, does its
|
||||
#. device and inode numbers match what xz saw when it opened
|
||||
#. the source file. If these checks fail, this message is
|
||||
#. shown, %s being the filename, and the file is not deleted.
|
||||
#. The check for device and inode numbers is there, because
|
||||
#. it is possible that the user has put a new file in place
|
||||
#. of the original file, and in that case it obviously
|
||||
#. shouldn't be removed.
|
||||
#: src/xz/file_io.c:136
|
||||
#, c-format
|
||||
msgid "%s: File seems to have been moved, not removing"
|
||||
msgstr "%s : Le fichier a apparemment été déplacé, suppression annulée"
|
||||
|
||||
#: src/xz/file_io.c:143 src/xz/file_io.c:635
|
||||
#, c-format
|
||||
msgid "%s: Cannot remove: %s"
|
||||
msgstr "%s : Impossible de supprimer : %s"
|
||||
|
||||
#: src/xz/file_io.c:168
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file owner: %s"
|
||||
msgstr "%s : Impossible de modifier le propriétaire du fichier : %s"
|
||||
|
||||
#: src/xz/file_io.c:174
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file group: %s"
|
||||
msgstr "%s : Impossible de modifier le groupe propriétaire du fichier : %s"
|
||||
|
||||
#: src/xz/file_io.c:193
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file permissions: %s"
|
||||
msgstr "%s : Impossible de modifier les permissions du fichier : %s"
|
||||
|
||||
#: src/xz/file_io.c:340 src/xz/file_io.c:423
|
||||
#, c-format
|
||||
msgid "%s: Is a symbolic link, skipping"
|
||||
msgstr "%s est un lien symbolique : ignoré"
|
||||
|
||||
#: src/xz/file_io.c:468
|
||||
#, c-format
|
||||
msgid "%s: Is a directory, skipping"
|
||||
msgstr "%s est un répertoire : ignoré"
|
||||
|
||||
#: src/xz/file_io.c:474
|
||||
#, c-format
|
||||
msgid "%s: Not a regular file, skipping"
|
||||
msgstr "%s n'est pas un fichier régulier : ignoré"
|
||||
|
||||
#: src/xz/file_io.c:491
|
||||
#, c-format
|
||||
msgid "%s: File has setuid or setgid bit set, skipping"
|
||||
msgstr "%s : Le fichier possède les bits `setuid' ou `setgid' : ignoré"
|
||||
|
||||
#: src/xz/file_io.c:498
|
||||
#, c-format
|
||||
msgid "%s: File has sticky bit set, skipping"
|
||||
msgstr "%s : Le fichier possède le bit `sticky' : ignoré"
|
||||
|
||||
#: src/xz/file_io.c:505
|
||||
#, c-format
|
||||
msgid "%s: Input file has more than one hard link, skipping"
|
||||
msgstr "%s : Le fichier d'entrée a plus d'un lien matériel : ignoré"
|
||||
|
||||
#: src/xz/file_io.c:761
|
||||
#, c-format
|
||||
msgid "Error restoring the O_APPEND flag to standard output: %s"
|
||||
msgstr "Impossible de rétablir le drapeau O_APPEND sur la sortie standard : %s"
|
||||
|
||||
#: src/xz/file_io.c:773
|
||||
#, c-format
|
||||
msgid "%s: Closing the file failed: %s"
|
||||
msgstr "%s : Impossible de fermer le fichier : %s"
|
||||
|
||||
#: src/xz/file_io.c:809 src/xz/file_io.c:1008
|
||||
#, c-format
|
||||
msgid "%s: Seeking failed when trying to create a sparse file: %s"
|
||||
msgstr "%s : Impossible de se déplacer dans le fichier pour créer un 'sparse file' : %s"
|
||||
|
||||
#: src/xz/file_io.c:883
|
||||
#, c-format
|
||||
msgid "%s: Read error: %s"
|
||||
msgstr "%s : Erreur d'écriture : %s"
|
||||
|
||||
#: src/xz/file_io.c:906
|
||||
#, c-format
|
||||
msgid "%s: Error seeking the file: %s"
|
||||
msgstr "%s : Impossible de se déplacer dans le fichier : %s"
|
||||
|
||||
#: src/xz/file_io.c:916
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of file"
|
||||
msgstr "%s : Fin de fichier inattendue"
|
||||
|
||||
#: src/xz/file_io.c:966
|
||||
#, c-format
|
||||
msgid "%s: Write error: %s"
|
||||
msgstr "%s : Erreur d'écriture : %s"
|
||||
|
||||
#: src/xz/hardware.c:101
|
||||
msgid "Disabled"
|
||||
msgstr "Désactivé"
|
||||
|
||||
#. TRANSLATORS: Test with "xz --info-memory" to see if
|
||||
#. the alignment looks nice.
|
||||
#: src/xz/hardware.c:120
|
||||
msgid "Total amount of physical memory (RAM): "
|
||||
msgstr "Quantité totale de mémoire physique (RAM) : "
|
||||
|
||||
#: src/xz/hardware.c:122
|
||||
msgid "Memory usage limit for compression: "
|
||||
msgstr "Limite d'utilisation pour la compression : "
|
||||
|
||||
#: src/xz/hardware.c:124
|
||||
msgid "Memory usage limit for decompression: "
|
||||
msgstr "Limite d'utilisation pour la décompression : "
|
||||
|
||||
#. TRANSLATORS: Indicates that there is no integrity check.
|
||||
#. This string is used in tables, so the width must not
|
||||
#. exceed ten columns with a fixed-width font.
|
||||
#: src/xz/list.c:62
|
||||
msgid "None"
|
||||
msgstr "Aucune"
|
||||
|
||||
#. TRANSLATORS: Indicates that integrity check name is not known,
|
||||
#. but the Check ID is known (here 2). This and other "Unknown-N"
|
||||
#. strings are used in tables, so the width must not exceed ten
|
||||
#. columns with a fixed-width font. It's OK to omit the dash if
|
||||
#. you need space for one extra letter, but don't use spaces.
|
||||
#: src/xz/list.c:69
|
||||
msgid "Unknown-2"
|
||||
msgstr "Inconnue-2"
|
||||
|
||||
#: src/xz/list.c:70
|
||||
msgid "Unknown-3"
|
||||
msgstr "Inconnue-3"
|
||||
|
||||
#: src/xz/list.c:72
|
||||
msgid "Unknown-5"
|
||||
msgstr "Inconnue-5"
|
||||
|
||||
#: src/xz/list.c:73
|
||||
msgid "Unknown-6"
|
||||
msgstr "Inconnue-6"
|
||||
|
||||
#: src/xz/list.c:74
|
||||
msgid "Unknown-7"
|
||||
msgstr "Inconnue-7"
|
||||
|
||||
#: src/xz/list.c:75
|
||||
msgid "Unknown-8"
|
||||
msgstr "Inconnue-8"
|
||||
|
||||
#: src/xz/list.c:76
|
||||
msgid "Unknown-9"
|
||||
msgstr "Inconnue-9"
|
||||
|
||||
#: src/xz/list.c:78
|
||||
msgid "Unknown-11"
|
||||
msgstr "Inconnue-11"
|
||||
|
||||
#: src/xz/list.c:79
|
||||
msgid "Unknown-12"
|
||||
msgstr "Inconnue-12"
|
||||
|
||||
#: src/xz/list.c:80
|
||||
msgid "Unknown-13"
|
||||
msgstr "Inconnue-13"
|
||||
|
||||
#: src/xz/list.c:81
|
||||
msgid "Unknown-14"
|
||||
msgstr "Inconnue-14"
|
||||
|
||||
#: src/xz/list.c:82
|
||||
msgid "Unknown-15"
|
||||
msgstr "Inconnue-15"
|
||||
|
||||
#: src/xz/list.c:126
|
||||
#, c-format
|
||||
msgid "%s: File is empty"
|
||||
msgstr "%s : Le fichier est vide"
|
||||
|
||||
#: src/xz/list.c:131
|
||||
#, c-format
|
||||
msgid "%s: Too small to be a valid .xz file"
|
||||
msgstr "%s : Trop petit pour être un fichier xz valide."
|
||||
|
||||
#. TRANSLATORS: These are column headings. From Strms (Streams)
|
||||
#. to Ratio, the columns are right aligned. Check and Filename
|
||||
#. are left aligned. If you need longer words, it's OK to
|
||||
#. use two lines here. Test with "xz -l foo.xz".
|
||||
#: src/xz/list.c:612
|
||||
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
|
||||
msgstr "Flux Blocs Compressé Décompressé Ratio Vérif Nom de fichier"
|
||||
|
||||
#: src/xz/list.c:652
|
||||
#, c-format
|
||||
msgid " Streams: %s\n"
|
||||
msgstr " Flux : %s\n"
|
||||
|
||||
#: src/xz/list.c:654
|
||||
#, c-format
|
||||
msgid " Blocks: %s\n"
|
||||
msgstr " Blocs : %s\n"
|
||||
|
||||
#: src/xz/list.c:656
|
||||
#, c-format
|
||||
msgid " Compressed size: %s\n"
|
||||
msgstr " Taille compressé : %s\n"
|
||||
|
||||
#: src/xz/list.c:659
|
||||
#, c-format
|
||||
msgid " Uncompressed size: %s\n"
|
||||
msgstr " Taille décompressé : %s\n"
|
||||
|
||||
#: src/xz/list.c:662
|
||||
#, c-format
|
||||
msgid " Ratio: %s\n"
|
||||
msgstr " Ratio : %s\n"
|
||||
|
||||
#: src/xz/list.c:664
|
||||
#, c-format
|
||||
msgid " Check: %s\n"
|
||||
msgstr " Vérification : %s\n"
|
||||
|
||||
#: src/xz/list.c:665
|
||||
#, c-format
|
||||
msgid " Stream padding: %s\n"
|
||||
msgstr " Octets de rembourrage du flux : %s\n"
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All except
|
||||
#. Check are right aligned; Check is left aligned. Test with
|
||||
#. "xz -lv foo.xz".
|
||||
#: src/xz/list.c:693
|
||||
msgid ""
|
||||
" Streams:\n"
|
||||
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
|
||||
msgstr ""
|
||||
" Flux :\n"
|
||||
" Flux Blocs PositionComp PositionDécomp TailleComp TailleDécomp Ratio Vérif. Bourrage"
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All
|
||||
#. except Check are right aligned; Check is left aligned.
|
||||
#: src/xz/list.c:748
|
||||
#, c-format
|
||||
msgid ""
|
||||
" Blocks:\n"
|
||||
" Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
|
||||
msgstr ""
|
||||
" Blocs :\n"
|
||||
" Flux Bloc PositionComp PositionDécomp TailleTot TailleDécomp Ratio Vérif."
|
||||
|
||||
#. TRANSLATORS: These are additional column headings
|
||||
#. for the most verbose listing mode. CheckVal
|
||||
#. (Check value), Flags, and Filters are left aligned.
|
||||
#. Header (Block Header Size), CompSize, and MemUsage
|
||||
#. are right aligned. %*s is replaced with 0-120
|
||||
#. spaces to make the CheckVal column wide enough.
|
||||
#. Test with "xz -lvv foo.xz".
|
||||
#: src/xz/list.c:760
|
||||
#, c-format
|
||||
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
|
||||
msgstr " ValVérif %*sEn-tête Drapeaux TailleComp UtilMém Filtres"
|
||||
|
||||
#: src/xz/list.c:838 src/xz/list.c:1007
|
||||
#, c-format
|
||||
msgid " Memory needed: %s MiB\n"
|
||||
msgstr " Mémoire nécessaire : %s MiB\n"
|
||||
|
||||
#: src/xz/list.c:840 src/xz/list.c:1009
|
||||
#, c-format
|
||||
msgid " Sizes in headers: %s\n"
|
||||
msgstr " Tailles stockées dans l'en-tête : %s\n"
|
||||
|
||||
#: src/xz/list.c:841 src/xz/list.c:1010
|
||||
msgid "Yes"
|
||||
msgstr "Oui"
|
||||
|
||||
#: src/xz/list.c:841 src/xz/list.c:1010
|
||||
msgid "No"
|
||||
msgstr "Non"
|
||||
|
||||
#. TRANSLATORS: %s is an integer. Only the plural form of this
|
||||
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
|
||||
#: src/xz/list.c:986
|
||||
#, c-format
|
||||
msgid "%s file\n"
|
||||
msgid_plural "%s files\n"
|
||||
msgstr[0] "%s fichier\n"
|
||||
msgstr[1] "%s fichiers\n"
|
||||
|
||||
#: src/xz/list.c:999
|
||||
msgid "Totals:"
|
||||
msgstr "Totaux :"
|
||||
|
||||
#: src/xz/list.c:1000
|
||||
#, c-format
|
||||
msgid " Number of files: %s\n"
|
||||
msgstr " Nombre de fichiers : %s\n"
|
||||
|
||||
#: src/xz/list.c:1072
|
||||
msgid "--list works only on .xz files (--format=xz or --format=auto)"
|
||||
msgstr "--list ne marche que sur les fichiers .xz (--format=xz ou --format=auto)"
|
||||
|
||||
#: src/xz/list.c:1078
|
||||
msgid "--list does not support reading from standard input"
|
||||
msgstr "--list est incompatible avec la lecture sur l'entrée standard"
|
||||
|
||||
#: src/xz/main.c:89
|
||||
#, c-format
|
||||
msgid "%s: Error reading filenames: %s"
|
||||
msgstr "%s : Erreur lors de la lecture des noms de fichiers : %s"
|
||||
|
||||
#: src/xz/main.c:96
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of input when reading filenames"
|
||||
msgstr "%s : Fin des données inattendue lors de la lecture des noms de fichiers"
|
||||
|
||||
#: src/xz/main.c:120
|
||||
#, c-format
|
||||
msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
|
||||
msgstr "%s : Caractère NULL détecté lors de la lecture des noms de fichiers ; peut-être pensiez-vous à `--files0' plutot qu'a `--files' ?"
|
||||
|
||||
#: src/xz/main.c:174
|
||||
msgid "Compression and decompression with --robot are not supported yet."
|
||||
msgstr "La compression et la décompression ne marchent pas encore avec --robot."
|
||||
|
||||
#: src/xz/main.c:231
|
||||
msgid "Cannot read data from standard input when reading filenames from standard input"
|
||||
msgstr "Impossible de lire à la fois les données et les noms de fichiers depuis l'entrée standard"
|
||||
|
||||
#. TRANSLATORS: This is the program name in the beginning
|
||||
#. of the line in messages. Usually it becomes "xz: ".
|
||||
#. This is a translatable string because French needs
|
||||
#. a space before a colon.
|
||||
#: src/xz/message.c:733
|
||||
#, c-format
|
||||
msgid "%s: "
|
||||
msgstr "%s : "
|
||||
|
||||
#: src/xz/message.c:796 src/xz/message.c:846
|
||||
msgid "Internal error (bug)"
|
||||
msgstr "Erreur interne (bug)"
|
||||
|
||||
#: src/xz/message.c:803
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr "Impossible d'installer le gestionnaire de signaux"
|
||||
|
||||
#: src/xz/message.c:812
|
||||
msgid "No integrity check; not verifying file integrity"
|
||||
msgstr "Pas de données de vérification d'intégrité ; vérification non effectuée"
|
||||
|
||||
#: src/xz/message.c:815
|
||||
msgid "Unsupported type of integrity check; not verifying file integrity"
|
||||
msgstr "Méthode de vérification d'intégrité non prise en charge ; vérification non effectuée"
|
||||
|
||||
#: src/xz/message.c:822
|
||||
msgid "Memory usage limit reached"
|
||||
msgstr "Limite d'utilisation mémoire atteinte"
|
||||
|
||||
#: src/xz/message.c:825
|
||||
msgid "File format not recognized"
|
||||
msgstr "Format de fichier inconnu"
|
||||
|
||||
#: src/xz/message.c:828
|
||||
msgid "Unsupported options"
|
||||
msgstr "Options non prises en charge"
|
||||
|
||||
#: src/xz/message.c:831
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr "Les données compressées sont corrompues"
|
||||
|
||||
#: src/xz/message.c:834
|
||||
msgid "Unexpected end of input"
|
||||
msgstr "Fin des données inattendue "
|
||||
|
||||
#: src/xz/message.c:885
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limit is %s."
|
||||
msgstr "%s MiB de mémoire sont nécessaires, la limite étant %s."
|
||||
|
||||
#: src/xz/message.c:1052
|
||||
#, c-format
|
||||
msgid "%s: Filter chain: %s\n"
|
||||
msgstr "%s : Enchaînement de filtres : %s\n"
|
||||
|
||||
#: src/xz/message.c:1062
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Utilisez `%s --help' pour plus d'informations."
|
||||
|
||||
#: src/xz/message.c:1088
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
"Compress or decompress FILEs in the .xz format.\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Utilisation : %s [OPTION]... [FICHIER]...\n"
|
||||
"Compresse ou decompresse FICHIER(s) au format .xz.\n"
|
||||
"\n"
|
||||
|
||||
#: src/xz/message.c:1095
|
||||
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr ""
|
||||
"Les arguments obligatoires pour les options longues le sont aussi pour les\n"
|
||||
"options courtes.\n"
|
||||
|
||||
#: src/xz/message.c:1099
|
||||
msgid " Operation mode:\n"
|
||||
msgstr " Mode d'opération :\n"
|
||||
|
||||
#: src/xz/message.c:1102
|
||||
msgid ""
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
" -t, --test test compressed file integrity\n"
|
||||
" -l, --list list information about .xz files"
|
||||
msgstr ""
|
||||
" -z, --compress forcer la compression\n"
|
||||
" -d, --decompress forcer la décompression\n"
|
||||
" -t, --test tester l'intégrité du fichier compressé\n"
|
||||
" -l, --list lister les informations à propos des fichiers .xz"
|
||||
|
||||
#: src/xz/message.c:1108
|
||||
msgid ""
|
||||
"\n"
|
||||
" Operation modifiers:\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Modifictauers :\n"
|
||||
|
||||
#: src/xz/message.c:1111
|
||||
msgid ""
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
" -c, --stdout write to standard output and don't delete input files"
|
||||
msgstr ""
|
||||
" -k, --keep ne pas supprimer les fichiers d'entrée (\"keep\")\n"
|
||||
" -f, --force forcer l'écrasement du fichier de sortie et\n"
|
||||
" (dé)compresser les liens\n"
|
||||
" -c, --stdout écrire sur la sortie standard et ne pas supprimer les\n"
|
||||
" fichiers d'entrée"
|
||||
|
||||
#: src/xz/message.c:1117
|
||||
msgid ""
|
||||
" --single-stream decompress only the first stream, and silently\n"
|
||||
" ignore possible remaining input data"
|
||||
msgstr ""
|
||||
" --single-stream décompresser uniquement le premier flux et ignorer\n"
|
||||
" silenciseusement les données éventuellement restantes"
|
||||
|
||||
#: src/xz/message.c:1120
|
||||
msgid ""
|
||||
" --no-sparse do not create sparse files when decompressing\n"
|
||||
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
" --files[=FILE] read filenames to process from FILE; if FILE is\n"
|
||||
" omitted, filenames are read from the standard input;\n"
|
||||
" filenames must be terminated with the newline character\n"
|
||||
" --files0[=FILE] like --files but use the null character as terminator"
|
||||
msgstr ""
|
||||
" --no-sparse ne pas créer de 'sparse file' lors de la décompression\n"
|
||||
" -S, --suffix=.SUF utiliser le suffixe `.SUF' pour les fichiers compressés\n"
|
||||
" --files[=FILE] lire les fichiers sur lesquels opérer depuis FILE ; si\n"
|
||||
" FILE est omis, ceux-ci sont lus depuis l'entrée standard\n"
|
||||
" et doivent être suivis d'un caractère de retour à la ligne\n"
|
||||
" --files0[=FILE] comme --files mais avec un caractère null comme séparateur"
|
||||
|
||||
#: src/xz/message.c:1129
|
||||
msgid ""
|
||||
"\n"
|
||||
" Basic file format and compression options:\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Options basiques de format de fichier et de compression :\n"
|
||||
|
||||
#: src/xz/message.c:1131
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', and `raw'\n"
|
||||
" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
|
||||
" `crc32', `crc64' (default), or `sha256'"
|
||||
msgstr ""
|
||||
" -F, --format=FMT format de fichier à encoder ou décoder ; les possibilités\n"
|
||||
" sont : `auto' (par défaut), `xz', `lzma' et `raw'\n"
|
||||
" -C, --check=CHECK type de vérification d'intégrité : `none' (à utiliser avec\n"
|
||||
" précaution), `crc32', `crc64' (par défaut) ou `sha256'"
|
||||
|
||||
#: src/xz/message.c:1138
|
||||
msgid ""
|
||||
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
|
||||
" decompressor memory usage into account before using 7-9!"
|
||||
msgstr ""
|
||||
" -0 ... -9 préréglage de compression ; 6 par défaut ; pensez à\n"
|
||||
" l'utilisation mémoire du compresseur *et* du décompresseur\n"
|
||||
" avant d'utiliser 7, 8 ou 9 !"
|
||||
|
||||
#: src/xz/message.c:1142
|
||||
msgid ""
|
||||
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
|
||||
" does not affect decompressor memory requirements"
|
||||
msgstr ""
|
||||
" -e, --extreme essayer d'améliorer la compression en utilisant davantage\n"
|
||||
" de temps processeur sans affecter les besoins mémoire du\n"
|
||||
" décompresseur"
|
||||
|
||||
#: src/xz/message.c:1147
|
||||
msgid ""
|
||||
" --block-size=SIZE\n"
|
||||
" when compressing to the .xz format, start a new block\n"
|
||||
" after every SIZE bytes of input; 0=disabled (default)"
|
||||
msgstr ""
|
||||
" --block-size=SIZE\n"
|
||||
" pour une compression au format .xz, entamer un nouveau\n"
|
||||
" bloc après SIZE octets d'entrée ; 0=désactivé (par défaut)"
|
||||
|
||||
#: src/xz/message.c:1151
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT\n"
|
||||
" set memory usage limit for compression, decompression,\n"
|
||||
" or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
|
||||
msgstr ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT\n"
|
||||
" règle la limite d'utilisation mémoire pour la compression,\n"
|
||||
" décompression ou les deux ; LIMIT est en octets, % de\n"
|
||||
" RAM, ou 0 pour les valeurs par défaut"
|
||||
|
||||
#: src/xz/message.c:1158
|
||||
msgid ""
|
||||
" --no-adjust if compression settings exceed the memory usage limit,\n"
|
||||
" give an error instead of adjusting the settings downwards"
|
||||
msgstr ""
|
||||
" --no-adjust si les réglages de compression dépassent la limite\n"
|
||||
" d'utilisation mémoire, renvoyer une erreur plutôt que de\n"
|
||||
" diminuer les réglages"
|
||||
|
||||
#: src/xz/message.c:1164
|
||||
msgid ""
|
||||
"\n"
|
||||
" Custom filter chain for compression (alternative for using presets):"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Enchaînement de filtres de compression personnalisé (au lieu des préréglages) :"
|
||||
|
||||
#: src/xz/message.c:1173
|
||||
msgid ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
|
||||
" --lzma2[=OPTS] more of the following options (valid values; default):\n"
|
||||
" preset=PRE reset options to a preset (0-9[e])\n"
|
||||
" dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n"
|
||||
" lc=NUM number of literal context bits (0-4; 3)\n"
|
||||
" lp=NUM number of literal position bits (0-4; 0)\n"
|
||||
" pb=NUM number of position bits (0-4; 2)\n"
|
||||
" mode=MODE compression mode (fast, normal; normal)\n"
|
||||
" nice=NUM nice length of a match (2-273; 64)\n"
|
||||
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
|
||||
" depth=NUM maximum search depth; 0=automatic (default)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 ou LZMA2 ; OPTS est une liste de zéro ou plusieurs\n"
|
||||
" --lzma2[=OPTS] options parmi les suivantes (vals. valides ; par défaut) :\n"
|
||||
" preset=PRE remettre les options à un préréglage (0-9[e])\n"
|
||||
" dict=NUM taille dictionnaire (4KiB - 1536MiB ; 8MiB)\n"
|
||||
" lc=NUM nombre de 'literal context bits' (0-4 ; 3)\n"
|
||||
" lp=NUM nombre de 'literal position bits' (0-4 ; 0)\n"
|
||||
" pb=NUM nombre de 'position bits' (0-4 ; 2)\n"
|
||||
" mode=MODE mode de compression (fast, normal ; normal)\n"
|
||||
" nice=NUM nice length of a match (2-273; 64)\n"
|
||||
" mf=NAME 'match finder' (hc3, hc4, bt2, bt3, bt4; bt4)\n"
|
||||
" depth=NUM profondeur de recherche maximale ;\n"
|
||||
" 0=automatique (par défaut)"
|
||||
|
||||
#: src/xz/message.c:1188
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
|
||||
" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
|
||||
" --arm[=OPTS] ARM BCJ filter (little endian only)\n"
|
||||
" --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
|
||||
" --sparc[=OPTS] SPARC BCJ filter\n"
|
||||
" Valid OPTS for all BCJ filters:\n"
|
||||
" start=NUM start offset for conversions (default=0)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --x86[=OPTS] filtre BCJ x86 (32-bit et 64-bit)\n"
|
||||
" --powerpc[=OPTS] filtre BCJ PowerPC ('big endian' uniquement)\n"
|
||||
" --ia64[=OPTS] filtre BCJ IA-64 (Itanium)\n"
|
||||
" --arm[=OPTS] filtre BCJ ARM ('little endian' uniquement)\n"
|
||||
" --armthumb[=OPTS] filtre BCJ ARM-Thumb ('little endian' uniquement)\n"
|
||||
" --sparc[=OPTS] filtre BCJ SPARC\n"
|
||||
" OPTS valides pour tous les filtres BCJ :\n"
|
||||
" start=NUM start offset for conversions (default=0)"
|
||||
|
||||
#: src/xz/message.c:1200
|
||||
msgid ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
|
||||
" dist=NUM distance between bytes being subtracted\n"
|
||||
" from each other (1-256; 1)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Filtre delta ; OPTS valides (vals. valides ; par défaut) :\n"
|
||||
" dist=NUM distance entre les octets soustraits\n"
|
||||
" les uns aux autres (1-256 ; 1)"
|
||||
|
||||
#: src/xz/message.c:1208
|
||||
msgid ""
|
||||
"\n"
|
||||
" Other options:\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Autres options :\n"
|
||||
|
||||
#: src/xz/message.c:1211
|
||||
msgid ""
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
|
||||
" -v, --verbose be verbose; specify twice for even more verbose"
|
||||
msgstr ""
|
||||
" -q, --quiet supprimer les avertissemnts ; spécifier deux fois pour\n"
|
||||
" aussi supprimer les erreur\n"
|
||||
" -v, --verbose être bavard ; spécifier deux fois pour l'être davantage"
|
||||
|
||||
#: src/xz/message.c:1216
|
||||
msgid " -Q, --no-warn make warnings not affect the exit status"
|
||||
msgstr " -Q, --no-warn les avertissements ne modifient pas le code de sortie"
|
||||
|
||||
#: src/xz/message.c:1218
|
||||
msgid " --robot use machine-parsable messages (useful for scripts)"
|
||||
msgstr ""
|
||||
" --robot utiliser des messages lisibles par un programme\n"
|
||||
" (utile pour les scripts)"
|
||||
|
||||
#: src/xz/message.c:1221
|
||||
msgid ""
|
||||
" --info-memory display the total amount of RAM and the currently active\n"
|
||||
" memory usage limits, and exit"
|
||||
msgstr ""
|
||||
" --info-memory affiche la quantité totale de RAM et la limite actuelle\n"
|
||||
" en mémoire puis quitte"
|
||||
|
||||
#: src/xz/message.c:1224
|
||||
msgid ""
|
||||
" -h, --help display the short help (lists only the basic options)\n"
|
||||
" -H, --long-help display this long help and exit"
|
||||
msgstr ""
|
||||
" -h, --help affiche l'aide courte (ne liste que les options de base)\n"
|
||||
" -H, --long-help affiche l'aide longue (ceci) puis quitte"
|
||||
|
||||
#: src/xz/message.c:1228
|
||||
msgid ""
|
||||
" -h, --help display this short help and exit\n"
|
||||
" -H, --long-help display the long help (lists also the advanced options)"
|
||||
msgstr ""
|
||||
" -h, --help affiche l'aide courte (ceci) puis quitte\n"
|
||||
" -H, --long-help affiche l'aide longue (liste aussi les options avancées)"
|
||||
|
||||
#: src/xz/message.c:1233
|
||||
msgid " -V, --version display the version number and exit"
|
||||
msgstr " -V, --version affiche le numéro de version puis quitte"
|
||||
|
||||
#: src/xz/message.c:1235
|
||||
msgid ""
|
||||
"\n"
|
||||
"With no FILE, or when FILE is -, read standard input.\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Sans FILE ou quand FILE est -, lire l'entrée standard.\n"
|
||||
|
||||
#. TRANSLATORS: This message indicates the bug reporting address
|
||||
#. for this package. Please add _another line_ saying
|
||||
#. "Report translation bugs to <...>\n" with the email or WWW
|
||||
#. address for translation bugs. Thanks.
|
||||
#: src/xz/message.c:1241
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr ""
|
||||
"Signaler les bogues à <%s> (en anglais ou en finlandais).\n"
|
||||
"Signaler les bogues de traduction à <camaradetux@gmail.com>.\n"
|
||||
|
||||
#: src/xz/message.c:1243
|
||||
#, c-format
|
||||
msgid "%s home page: <%s>\n"
|
||||
msgstr "%s page du projet : <%s>\n"
|
||||
|
||||
#: src/xz/options.c:86
|
||||
#, c-format
|
||||
msgid "%s: Options must be `name=value' pairs separated with commas"
|
||||
msgstr "%s: Les options doivent être des paires `nom=valeur' séparées par des virgules"
|
||||
|
||||
#: src/xz/options.c:93
|
||||
#, c-format
|
||||
msgid "%s: Invalid option name"
|
||||
msgstr "%s : Nom d'option invalide"
|
||||
|
||||
#: src/xz/options.c:113
|
||||
#, c-format
|
||||
msgid "%s: Invalid option value"
|
||||
msgstr "%s : Valeur d'option invalide"
|
||||
|
||||
#: src/xz/options.c:247
|
||||
#, c-format
|
||||
msgid "Unsupported LZMA1/LZMA2 preset: %s"
|
||||
msgstr "Préréglage LZMA1/LZMA2 non pris en charge : %s"
|
||||
|
||||
#: src/xz/options.c:355
|
||||
msgid "The sum of lc and lp must not exceed 4"
|
||||
msgstr "La somme de lc et lp ne doit pas dépasser 4"
|
||||
|
||||
#: src/xz/options.c:359
|
||||
#, c-format
|
||||
msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
msgstr "Le `match finder' choisi nécessite au moins nice=%<PRIu32>"
|
||||
|
||||
#: src/xz/suffix.c:133 src/xz/suffix.c:258
|
||||
#, c-format
|
||||
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr "%s : Avec --format=raw, --suffix=.SUF est nécessaire sauf lors de l'écriture vers stdout"
|
||||
|
||||
#: src/xz/suffix.c:164
|
||||
#, c-format
|
||||
msgid "%s: Filename has an unknown suffix, skipping"
|
||||
msgstr "%s : Le fichier a un suffixe inconnu, ignoré"
|
||||
|
||||
#: src/xz/suffix.c:185
|
||||
#, c-format
|
||||
msgid "%s: File already has `%s' suffix, skipping"
|
||||
msgstr "%s : Le fichier a déjà le suffixe '%s', ignoré"
|
||||
|
||||
#: src/xz/suffix.c:393
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename suffix"
|
||||
msgstr "%s: Suffixe de nom de fichier invalide"
|
||||
|
||||
#: src/xz/util.c:61
|
||||
#, c-format
|
||||
msgid "%s: Value is not a non-negative decimal integer"
|
||||
msgstr "%s : La valeur n'est pas un entier décimal non négatif"
|
||||
|
||||
#: src/xz/util.c:103
|
||||
#, c-format
|
||||
msgid "%s: Invalid multiplier suffix"
|
||||
msgstr "%s : Suffixe multiplicateur invalide"
|
||||
|
||||
#: src/xz/util.c:105
|
||||
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
|
||||
msgstr "Les suffixes valides sont 'KiB' (2^10), 'MiB' (2^20) et 'GiB' (2^30)."
|
||||
|
||||
#: src/xz/util.c:122
|
||||
#, c-format
|
||||
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
|
||||
msgstr "La valeur de l'option '%s' doit être inclue entre %<PRIu64> et %<PRIu64>"
|
||||
|
||||
#: src/xz/util.c:247
|
||||
msgid "Empty filename, skipping"
|
||||
msgstr "Nom de fichier vide, ignoré"
|
||||
|
||||
#: src/xz/util.c:261
|
||||
msgid "Compressed data cannot be read from a terminal"
|
||||
msgstr "Les données compressées ne peuvent pas être lues depuis un terminal"
|
||||
|
||||
#: src/xz/util.c:274
|
||||
msgid "Compressed data cannot be written to a terminal"
|
||||
msgstr "Les données compressées ne peuvent pas être écrites dans un terminal"
|
||||
|
||||
#: src/common/tuklib_exit.c:39
|
||||
msgid "Writing to standard output failed"
|
||||
msgstr "Impossible d'écrire vers la sortie standard"
|
||||
|
||||
#: src/common/tuklib_exit.c:42
|
||||
msgid "Unknown error"
|
||||
msgstr "Erreur inconnue"
|
||||
902
po/it.po
Normal file
902
po/it.po
Normal file
@@ -0,0 +1,902 @@
|
||||
# Italian translation for xz-utils
|
||||
# This file is in the public domain
|
||||
# Gruppo traduzione italiano di Ubuntu-it <gruppo-traduzione@ubuntu-it.org>, 2009, 2010
|
||||
# Lorenzo De Liso <blackz@ubuntu.com>, 2010.
|
||||
# Milo Casagrande <milo@ubuntu.com>, 2009, 2010.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz-utils\n"
|
||||
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
|
||||
"POT-Creation-Date: 2010-09-10 14:50+0300\n"
|
||||
"PO-Revision-Date: 2010-09-16 21:32+0200\n"
|
||||
"Last-Translator: Milo Casagrande <milo@ubuntu.com>\n"
|
||||
"Language-Team: Italian <tp@lists.linux.it>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-16 19:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: src/xz/args.c:333
|
||||
#, c-format
|
||||
msgid "%s: Unknown file format type"
|
||||
msgstr "%s: tipo di formato del file sconosciutoN"
|
||||
|
||||
#: src/xz/args.c:356 src/xz/args.c:364
|
||||
#, c-format
|
||||
msgid "%s: Unsupported integrity check type"
|
||||
msgstr "%s: tipo di controllo integrità non supportato"
|
||||
|
||||
#: src/xz/args.c:382
|
||||
msgid "Only one file can be specified with `--files' or `--files0'."
|
||||
msgstr "Solo un file può essere specificato con \"--files\" o \"--files0\"."
|
||||
|
||||
#: src/xz/args.c:445
|
||||
#, c-format
|
||||
msgid "The environment variable %s contains too many arguments"
|
||||
msgstr "La variabile d'ambiente %s contiene troppi argomenti"
|
||||
|
||||
#: src/xz/coder.c:95
|
||||
msgid "Maximum number of filters is four"
|
||||
msgstr "Il numero massimo di filtri è quattro"
|
||||
|
||||
#: src/xz/coder.c:108
|
||||
msgid "Memory usage limit is too low for the given filter setup."
|
||||
msgstr ""
|
||||
"Il limite dell'uso della memoria è troppo basso per l'impostazione del "
|
||||
"filtro dato."
|
||||
|
||||
#: src/xz/coder.c:129
|
||||
msgid "Using a preset in raw mode is discouraged."
|
||||
msgstr "Non è consigliato usare un preset nella modalità raw."
|
||||
|
||||
#: src/xz/coder.c:131
|
||||
msgid "The exact options of the presets may vary between software versions."
|
||||
msgstr ""
|
||||
"Le opzioni esatte per i preset possono variare tra le versioni del software."
|
||||
|
||||
#: src/xz/coder.c:157
|
||||
msgid "The .lzma format supports only the LZMA1 filter"
|
||||
msgstr "Il formato .lzma supporta solo il filtro LZMA1"
|
||||
|
||||
#: src/xz/coder.c:165
|
||||
msgid "LZMA1 cannot be used with the .xz format"
|
||||
msgstr "LZMA1 non può essere usato con il formato .xz"
|
||||
|
||||
#: src/xz/coder.c:182
|
||||
msgid "Unsupported filter chain or filter options"
|
||||
msgstr "Catena di filtri od opzioni del filtro non supportata"
|
||||
|
||||
#: src/xz/coder.c:190
|
||||
#, c-format
|
||||
msgid "Decompression will need %s MiB of memory."
|
||||
msgstr "L'estrazione necessita di %s MiB di memoria."
|
||||
|
||||
#: src/xz/coder.c:247
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the "
|
||||
"memory usage limit of %s MiB"
|
||||
msgstr ""
|
||||
"Regolata la dimensione del dizionario LZMA%c da %s MiB a %s MiB per non "
|
||||
"superare il limite dell'uso della memoria di %s MiB"
|
||||
|
||||
#. TRANSLATORS: When compression or decompression finishes,
|
||||
#. and xz is going to remove the source file, xz first checks
|
||||
#. if the source file still exists, and if it does, does its
|
||||
#. device and inode numbers match what xz saw when it opened
|
||||
#. the source file. If these checks fail, this message is
|
||||
#. shown, %s being the filename, and the file is not deleted.
|
||||
#. The check for device and inode numbers is there, because
|
||||
#. it is possible that the user has put a new file in place
|
||||
#. of the original file, and in that case it obviously
|
||||
#. shouldn't be removed.
|
||||
#: src/xz/file_io.c:137
|
||||
#, c-format
|
||||
msgid "%s: File seems to have been moved, not removing"
|
||||
msgstr "%s: sembra che il file sia stato spostato, non viene rimosso"
|
||||
|
||||
#: src/xz/file_io.c:144 src/xz/file_io.c:590
|
||||
#, c-format
|
||||
msgid "%s: Cannot remove: %s"
|
||||
msgstr "%s: impossibile rimuovere: %s"
|
||||
|
||||
#: src/xz/file_io.c:169
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file owner: %s"
|
||||
msgstr "%s: impossibile impostare il proprietario del file: %s"
|
||||
|
||||
#: src/xz/file_io.c:175
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file group: %s"
|
||||
msgstr "%s: impossibile impostare il gruppo del file: %s"
|
||||
|
||||
#: src/xz/file_io.c:194
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file permissions: %s"
|
||||
msgstr "%s: impossibile impostare i permessi del file: %s"
|
||||
|
||||
#: src/xz/file_io.c:337 src/xz/file_io.c:420
|
||||
#, c-format
|
||||
msgid "%s: Is a symbolic link, skipping"
|
||||
msgstr "%s: è un collegamento simbolico, viene saltato"
|
||||
|
||||
#: src/xz/file_io.c:455
|
||||
#, c-format
|
||||
msgid "%s: Is a directory, skipping"
|
||||
msgstr "%s: è una directory, viene saltata"
|
||||
|
||||
#: src/xz/file_io.c:462
|
||||
#, c-format
|
||||
msgid "%s: Not a regular file, skipping"
|
||||
msgstr "%s: non è un file regolare, viene saltato"
|
||||
|
||||
#: src/xz/file_io.c:479
|
||||
#, c-format
|
||||
msgid "%s: File has setuid or setgid bit set, skipping"
|
||||
msgstr "%s: il file ha il bit setuid o setgid impostato, viene saltato"
|
||||
|
||||
#: src/xz/file_io.c:486
|
||||
#, c-format
|
||||
msgid "%s: File has sticky bit set, skipping"
|
||||
msgstr "%s: il file ha lo sticky bit impostato, viene saltato"
|
||||
|
||||
#: src/xz/file_io.c:493
|
||||
#, c-format
|
||||
msgid "%s: Input file has more than one hard link, skipping"
|
||||
msgstr "%s: il file di input ha più di un collegamento fisico, viene saltato"
|
||||
|
||||
#: src/xz/file_io.c:714
|
||||
#, c-format
|
||||
msgid "Error restoring the O_APPEND flag to standard output: %s"
|
||||
msgstr "Errore nel ripristinare la flag O_APPEND sullo standard output: %s"
|
||||
|
||||
#: src/xz/file_io.c:726
|
||||
#, c-format
|
||||
msgid "%s: Closing the file failed: %s"
|
||||
msgstr "%s: chiusura del file non riuscita: %s"
|
||||
|
||||
#: src/xz/file_io.c:762 src/xz/file_io.c:946
|
||||
#, c-format
|
||||
msgid "%s: Seeking failed when trying to create a sparse file: %s"
|
||||
msgstr ""
|
||||
"%s: posizionamento non riuscito nel tentativo di creare un file sparso: %s"
|
||||
|
||||
#: src/xz/file_io.c:821
|
||||
#, c-format
|
||||
msgid "%s: Read error: %s"
|
||||
msgstr "%s: errore di lettura: %s"
|
||||
|
||||
#: src/xz/file_io.c:844
|
||||
#, c-format
|
||||
msgid "%s: Error seeking the file: %s"
|
||||
msgstr "%s: errore nel cercare il file: %s"
|
||||
|
||||
#: src/xz/file_io.c:854
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of file"
|
||||
msgstr "%s: fine del file inaspettata"
|
||||
|
||||
#: src/xz/file_io.c:904
|
||||
#, c-format
|
||||
msgid "%s: Write error: %s"
|
||||
msgstr "%s: errore di scrittura: %s"
|
||||
|
||||
#: src/xz/hardware.c:100
|
||||
msgid "Disabled"
|
||||
msgstr "Disabilitato"
|
||||
|
||||
#. TRANSLATORS: Test with "xz --info-memory" to see if
|
||||
#. the alignment looks nice.
|
||||
#: src/xz/hardware.c:119
|
||||
msgid "Total amount of physical memory (RAM): "
|
||||
msgstr "Quantità totale di memoria fisica (RAM): "
|
||||
|
||||
#: src/xz/hardware.c:121
|
||||
msgid "Memory usage limit for compression: "
|
||||
msgstr "Limite utilizzo memoria per la compressione: "
|
||||
|
||||
#: src/xz/hardware.c:123
|
||||
msgid "Memory usage limit for decompression: "
|
||||
msgstr "Limite utilizzo memoria per l'estrazione: "
|
||||
|
||||
#. TRANSLATORS: Indicates that there is no integrity check.
|
||||
#. This string is used in tables, so the width must not
|
||||
#. exceed ten columns with a fixed-width font.
|
||||
#: src/xz/list.c:62
|
||||
msgid "None"
|
||||
msgstr "Nessuno"
|
||||
|
||||
#. TRANSLATORS: Indicates that integrity check name is not known,
|
||||
#. but the Check ID is known (here 2). This and other "Unknown-N"
|
||||
#. strings are used in tables, so the width must not exceed ten
|
||||
#. columns with a fixed-width font. It's OK to omit the dash if
|
||||
#. you need space for one extra letter.
|
||||
#: src/xz/list.c:69
|
||||
msgid "Unknown-2"
|
||||
msgstr "Sconosc2"
|
||||
|
||||
#: src/xz/list.c:70
|
||||
msgid "Unknown-3"
|
||||
msgstr "Sconosc3"
|
||||
|
||||
#: src/xz/list.c:72
|
||||
msgid "Unknown-5"
|
||||
msgstr "Sconosc5"
|
||||
|
||||
#: src/xz/list.c:73
|
||||
msgid "Unknown-6"
|
||||
msgstr "Sconosc6"
|
||||
|
||||
#: src/xz/list.c:74
|
||||
msgid "Unknown-7"
|
||||
msgstr "Sconosc7"
|
||||
|
||||
#: src/xz/list.c:75
|
||||
msgid "Unknown-8"
|
||||
msgstr "Sconosc8"
|
||||
|
||||
#: src/xz/list.c:76
|
||||
msgid "Unknown-9"
|
||||
msgstr "Sconosc9"
|
||||
|
||||
#: src/xz/list.c:78
|
||||
msgid "Unknown-11"
|
||||
msgstr "Sconosc11"
|
||||
|
||||
#: src/xz/list.c:79
|
||||
msgid "Unknown-12"
|
||||
msgstr "Sconosc12"
|
||||
|
||||
#: src/xz/list.c:80
|
||||
msgid "Unknown-13"
|
||||
msgstr "Sconosc13"
|
||||
|
||||
#: src/xz/list.c:81
|
||||
msgid "Unknown-14"
|
||||
msgstr "Sconosc14"
|
||||
|
||||
#: src/xz/list.c:82
|
||||
msgid "Unknown-15"
|
||||
msgstr "Sconosc15"
|
||||
|
||||
#: src/xz/list.c:126
|
||||
#, c-format
|
||||
msgid "%s: File is empty"
|
||||
msgstr "%s: il file è vuoto"
|
||||
|
||||
#: src/xz/list.c:131
|
||||
#, c-format
|
||||
msgid "%s: Too small to be a valid .xz file"
|
||||
msgstr "%s: troppo piccolo per essere un file .xz valido"
|
||||
|
||||
#. TRANSLATORS: These are column headings. From Strms (Streams)
|
||||
#. to Ratio, the columns are right aligned. Check and Filename
|
||||
#. are left aligned. If you need longer words, it's OK to
|
||||
#. use two lines here. Test with "xz -l foo.xz".
|
||||
#: src/xz/list.c:612
|
||||
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
|
||||
msgstr " Strm Blocc. Compresso Estratto Rapp. Contr Nome file"
|
||||
|
||||
#: src/xz/list.c:652
|
||||
#, c-format
|
||||
msgid " Streams: %s\n"
|
||||
msgstr " Stream: %s\n"
|
||||
|
||||
#: src/xz/list.c:654
|
||||
#, c-format
|
||||
msgid " Blocks: %s\n"
|
||||
msgstr " Blocchi: %s\n"
|
||||
|
||||
#: src/xz/list.c:656
|
||||
#, c-format
|
||||
msgid " Compressed size: %s\n"
|
||||
msgstr " Dim. compresso: %s\n"
|
||||
|
||||
#: src/xz/list.c:659
|
||||
#, c-format
|
||||
msgid " Uncompressed size: %s\n"
|
||||
msgstr " Dim. estratto: %s\n"
|
||||
|
||||
#: src/xz/list.c:662
|
||||
#, c-format
|
||||
msgid " Ratio: %s\n"
|
||||
msgstr " Rapporto: %s\n"
|
||||
|
||||
#: src/xz/list.c:664
|
||||
#, c-format
|
||||
msgid " Check: %s\n"
|
||||
msgstr " Controllo: %s\n"
|
||||
|
||||
#: src/xz/list.c:665
|
||||
#, c-format
|
||||
msgid " Stream padding: %s\n"
|
||||
msgstr " Padding dello stream: %s\n"
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All except
|
||||
#. Check are right aligned; Check is left aligned. Test with
|
||||
#. "xz -lv foo.xz".
|
||||
#: src/xz/list.c:693
|
||||
msgid ""
|
||||
" Streams:\n"
|
||||
" Stream Blocks CompOffset UncompOffset CompSize "
|
||||
"UncompSize Ratio Check Padding"
|
||||
msgstr ""
|
||||
"Stream:\n"
|
||||
" Stream Blocc. Offset comp. Offset estr. Dim. comp. Dim. "
|
||||
"estratto Rapp. Contr Padding"
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All
|
||||
#. except Check are right aligned; Check is left aligned.
|
||||
#: src/xz/list.c:748
|
||||
#, c-format
|
||||
msgid ""
|
||||
" Blocks:\n"
|
||||
" Stream Block CompOffset UncompOffset TotalSize "
|
||||
"UncompSize Ratio Check"
|
||||
msgstr ""
|
||||
" Blocchi:\n"
|
||||
" Stream Blocc. Offset comp. Offset estratto Dim. tot. Dim. "
|
||||
"estratto Rapp. Contr"
|
||||
|
||||
#. TRANSLATORS: These are additional column headings
|
||||
#. for the most verbose listing mode. CheckVal
|
||||
#. (Check value), Flags, and Filters are left aligned.
|
||||
#. Header (Block Header Size), CompSize, and MemUsage
|
||||
#. are right aligned. %*s is replaced with 0-120
|
||||
#. spaces to make the CheckVal column wide enough.
|
||||
#. Test with "xz -lvv foo.xz".
|
||||
#: src/xz/list.c:760
|
||||
#, c-format
|
||||
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
|
||||
msgstr " Val.cont %*s Header Flag Dim.compr. Uso mem. Filtri"
|
||||
|
||||
#: src/xz/list.c:838 src/xz/list.c:1007
|
||||
#, c-format
|
||||
msgid " Memory needed: %s MiB\n"
|
||||
msgstr " Memoria necessaria: %s MiB\n"
|
||||
|
||||
#: src/xz/list.c:840 src/xz/list.c:1009
|
||||
#, c-format
|
||||
msgid " Sizes in headers: %s\n"
|
||||
msgstr " Dim. negli header: %s\n"
|
||||
|
||||
#: src/xz/list.c:841 src/xz/list.c:1010
|
||||
msgid "Yes"
|
||||
msgstr "Sì"
|
||||
|
||||
#: src/xz/list.c:841 src/xz/list.c:1010
|
||||
msgid "No"
|
||||
msgstr "No"
|
||||
|
||||
#. TRANSLATORS: %s is an integer. Only the plural form of this
|
||||
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
|
||||
#: src/xz/list.c:986
|
||||
#, c-format
|
||||
msgid "%s file\n"
|
||||
msgid_plural "%s files\n"
|
||||
msgstr[0] "%s file\n"
|
||||
msgstr[1] "%s file\n"
|
||||
|
||||
#: src/xz/list.c:999
|
||||
msgid "Totals:"
|
||||
msgstr "Totali:"
|
||||
|
||||
#: src/xz/list.c:1000
|
||||
#, c-format
|
||||
msgid " Number of files: %s\n"
|
||||
msgstr " Numero di file: %s\n"
|
||||
|
||||
#: src/xz/list.c:1072
|
||||
msgid "--list works only on .xz files (--format=xz or --format=auto)"
|
||||
msgstr "--list funziona solamente con file .xz (--format=xz o --format=auto)"
|
||||
|
||||
#: src/xz/list.c:1078
|
||||
msgid "--list does not support reading from standard input"
|
||||
msgstr "--list non è in grado di leggere dallo standard input"
|
||||
|
||||
#: src/xz/main.c:89
|
||||
#, c-format
|
||||
msgid "%s: Error reading filenames: %s"
|
||||
msgstr "%s: errore nel leggere i nomi dei file: %s"
|
||||
|
||||
#: src/xz/main.c:96
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of input when reading filenames"
|
||||
msgstr "%s: fine dell'input durante la lettura dei nomi dei file non attesa"
|
||||
|
||||
#: src/xz/main.c:120
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s: Null character found when reading filenames; maybe you meant to use `--"
|
||||
"files0' instead of `--files'?"
|
||||
msgstr ""
|
||||
"%s: nessun carattere trovato durante la lettura dei nomi dei file; forse si "
|
||||
"intendeva usare \"--files0\" invece di \"--files\"?"
|
||||
|
||||
#: src/xz/main.c:174
|
||||
msgid "Compression and decompression with --robot are not supported yet."
|
||||
msgstr "La compressione e l'estrazione con --robot non sono ancora supportate."
|
||||
|
||||
#: src/xz/main.c:231
|
||||
msgid ""
|
||||
"Cannot read data from standard input when reading filenames from standard "
|
||||
"input"
|
||||
msgstr ""
|
||||
"Impossibile leggere i dati dallo standard input durante la lettura dei nomi "
|
||||
"dei file dallo standard input"
|
||||
|
||||
#: src/xz/message.c:800 src/xz/message.c:844
|
||||
msgid "Internal error (bug)"
|
||||
msgstr "Errore interno (bug)"
|
||||
|
||||
#: src/xz/message.c:807
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr "Impossibile stabilire i gestori dei segnali"
|
||||
|
||||
#: src/xz/message.c:816
|
||||
msgid "No integrity check; not verifying file integrity"
|
||||
msgstr ""
|
||||
"Nessun controllo d'integrità; l'integrità del file non viene verificata"
|
||||
|
||||
#: src/xz/message.c:819
|
||||
msgid "Unsupported type of integrity check; not verifying file integrity"
|
||||
msgstr ""
|
||||
"Tipo di controllo di integrità non supportato; l'integrità del file non "
|
||||
"viene verificata"
|
||||
|
||||
#: src/xz/message.c:826
|
||||
msgid "Memory usage limit reached"
|
||||
msgstr "Limite di utilizzo della memoria raggiunto"
|
||||
|
||||
#: src/xz/message.c:829
|
||||
msgid "File format not recognized"
|
||||
msgstr "Formato di file non riconosciuto"
|
||||
|
||||
#: src/xz/message.c:832
|
||||
msgid "Unsupported options"
|
||||
msgstr "Opzioni non supportate"
|
||||
|
||||
#: src/xz/message.c:835
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr "I dati compressi sono danneggiati"
|
||||
|
||||
#: src/xz/message.c:838
|
||||
msgid "Unexpected end of input"
|
||||
msgstr "Fine dell'input non attesa"
|
||||
|
||||
#: src/xz/message.c:886
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limit is %s."
|
||||
msgstr "%s MiB di memoria sono richiesti. Il limite è %s."
|
||||
|
||||
#: src/xz/message.c:1053
|
||||
#, c-format
|
||||
msgid "%s: Filter chain: %s\n"
|
||||
msgstr "%s: catena di filtri: %s\n"
|
||||
|
||||
#: src/xz/message.c:1063
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Provare \"%s --help\" per maggiori informazioni."
|
||||
|
||||
#: src/xz/message.c:1089
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
"Compress or decompress FILEs in the .xz format.\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Uso: %s [OPZIONI]... [FILE]...\n"
|
||||
"Comprime o estrae i FILE nel formato .xz.\n"
|
||||
"\n"
|
||||
|
||||
#: src/xz/message.c:1096
|
||||
msgid ""
|
||||
"Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr ""
|
||||
"Gli argomenti obbligatori per le opzioni lunghe lo sono anche per quelle "
|
||||
"brevi.\n"
|
||||
|
||||
#: src/xz/message.c:1100
|
||||
msgid " Operation mode:\n"
|
||||
msgstr " Modalità di operazione:\n"
|
||||
|
||||
#: src/xz/message.c:1103
|
||||
msgid ""
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
" -t, --test test compressed file integrity\n"
|
||||
" -l, --list list information about .xz files"
|
||||
msgstr ""
|
||||
" -z, --compress Forza la compressione\n"
|
||||
" -d, --decompress Forza l'estrazione\n"
|
||||
" -t, --test Verifica l'integrità dei file compressi\n"
|
||||
" -l, --list Elenca informazioni sui file .xz"
|
||||
|
||||
#: src/xz/message.c:1109
|
||||
msgid ""
|
||||
"\n"
|
||||
" Operation modifiers:\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Modificatori di operazioni:\n"
|
||||
|
||||
#: src/xz/message.c:1112
|
||||
msgid ""
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
" -c, --stdout write to standard output and don't delete input files"
|
||||
msgstr ""
|
||||
" -k, --keep Mantiene (non elimina) i file di input\n"
|
||||
" -f, --force Forza la sovrascrittura dell'output e comprime/estrae "
|
||||
"i\n"
|
||||
" collegamenti\n"
|
||||
" -c, --stdout Scrive sullo standard output e non elimina i file di "
|
||||
"input"
|
||||
|
||||
#: src/xz/message.c:1118
|
||||
msgid ""
|
||||
" --no-sparse do not create sparse files when decompressing\n"
|
||||
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
" --files[=FILE] read filenames to process from FILE; if FILE is\n"
|
||||
" omitted, filenames are read from the standard input;\n"
|
||||
" filenames must be terminated with the newline "
|
||||
"character\n"
|
||||
" --files0[=FILE] like --files but use the null character as terminator"
|
||||
msgstr ""
|
||||
" --no-sparse Non crea file sparsi durante l'estrazione\n"
|
||||
" -S, --suffix=.SUF Usa il suffisso \".SUF\" sui file compressi\n"
|
||||
" --files=[FILE] Legge i nomi dei file da elaborare da FILE; se FILE è\n"
|
||||
" omesso, i nomi dei file sono letti dallo standard "
|
||||
"input;\n"
|
||||
" i nomi dei file devono essere terminati con un "
|
||||
"carattere\n"
|
||||
" di newline\n"
|
||||
" --files0=[FILE] Come --files ma usa il carattere null come terminatore"
|
||||
|
||||
#: src/xz/message.c:1126
|
||||
msgid ""
|
||||
"\n"
|
||||
" Basic file format and compression options:\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Formato file di base e opzioni di compressione:\n"
|
||||
|
||||
#: src/xz/message.c:1128
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', and `raw'\n"
|
||||
" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
|
||||
" `crc32', `crc64' (default), or `sha256'"
|
||||
msgstr ""
|
||||
" -F, --format=FMT Formato file per codificare o decodificare; i "
|
||||
"possibili\n"
|
||||
" valori sono \"auto\" (predefinito) \"xz\", \"lzma\" e "
|
||||
"\"raw\"\n"
|
||||
" -C, --check=CHECK Tipo di verifica integrità: \"none\" (usare con "
|
||||
"attenzione),\n"
|
||||
" \"crc32\", \"crc64\" (predefinito) o \"sha256\""
|
||||
|
||||
#: src/xz/message.c:1135
|
||||
msgid ""
|
||||
" -0 ... -9 compression preset; default is 6; take compressor "
|
||||
"*and*\n"
|
||||
" decompressor memory usage into account before using 7-"
|
||||
"9!"
|
||||
msgstr ""
|
||||
" -0 ... -9 Preset di compressione; predefinito è 6; tenere a "
|
||||
"mente\n"
|
||||
" l'utilizzo di memoria per comprimere ed estrarre "
|
||||
"prima\n"
|
||||
" di usare 7-9"
|
||||
|
||||
#: src/xz/message.c:1139
|
||||
msgid ""
|
||||
" -e, --extreme try to improve compression ratio by using more CPU "
|
||||
"time;\n"
|
||||
" does not affect decompressor memory requirements"
|
||||
msgstr ""
|
||||
" -e, --extreme Tenta di migliorare il rapporto di compressione\n"
|
||||
" utilizzando più tempo di CPU; non cambia i requisiti "
|
||||
"di\n"
|
||||
" memoria in fase di estrazione"
|
||||
|
||||
#: src/xz/message.c:1144
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT\n"
|
||||
" set memory usage limit for compression, "
|
||||
"decompression,\n"
|
||||
" or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
|
||||
msgstr ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT\n"
|
||||
" Imposta il limite di utilizzo della memoria per la\n"
|
||||
" compressione, l'estrazione o entrambe; LIMIT è in "
|
||||
"byte,\n"
|
||||
" % della memoria RAM oppure 0 per il valore predefinito"
|
||||
|
||||
#: src/xz/message.c:1151
|
||||
msgid ""
|
||||
" --no-adjust if compression settings exceed the memory usage "
|
||||
"limit,\n"
|
||||
" give an error instead of adjusting the settings "
|
||||
"downwards"
|
||||
msgstr ""
|
||||
" --no-adjust Se le impostazioni di compressione eccedono il limite "
|
||||
"di\n"
|
||||
" utilizzo della memoria, lancia un errore invece di\n"
|
||||
" utilizzare valori più piccoli"
|
||||
|
||||
#: src/xz/message.c:1157
|
||||
msgid ""
|
||||
"\n"
|
||||
" Custom filter chain for compression (alternative for using presets):"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Catena di filtri personalizzati per la compressione (alternative per\n"
|
||||
" l'utilizzo di preset):"
|
||||
|
||||
#: src/xz/message.c:1166
|
||||
msgid ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero "
|
||||
"or\n"
|
||||
" --lzma2[=OPTS] more of the following options (valid values; "
|
||||
"default):\n"
|
||||
" preset=PRE reset options to a preset (0-9[e])\n"
|
||||
" dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n"
|
||||
" lc=NUM number of literal context bits (0-4; 3)\n"
|
||||
" lp=NUM number of literal position bits (0-4; 0)\n"
|
||||
" pb=NUM number of position bits (0-4; 2)\n"
|
||||
" mode=MODE compression mode (fast, normal; normal)\n"
|
||||
" nice=NUM nice length of a match (2-273; 64)\n"
|
||||
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; "
|
||||
"bt4)\n"
|
||||
" depth=NUM maximum search depth; 0=automatic "
|
||||
"(default)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --lzma1[=OPZ] LZMA1 o LZMA2; OPZ è un elenco separato da virgole di "
|
||||
"zero\n"
|
||||
" --lzma2[=OPZ] o più delle seguenti opzioni (valori validi; "
|
||||
"predefinito):\n"
|
||||
" preset=NUM Reimposta le opzioni al preset NUM (0-9"
|
||||
"[e])\n"
|
||||
" dict=NUM Dimensione del dizionario\n"
|
||||
" (4KiB - 1536MiB; 8MiB)\n"
|
||||
" lc=NUM Numero di bit letterali di contesto (0-4; "
|
||||
"3)\n"
|
||||
" lp=NUM Numero di bit letterali di posizione (0-"
|
||||
"4; 0)\n"
|
||||
" pb=NUM Numero di bit di posizione (0-4; 2)\n"
|
||||
" mode=MODE Modalità di compressione\n"
|
||||
" (fast, normal; normal)\n"
|
||||
" nice=NUM Lunghezza valida per una corrispondenza\n"
|
||||
" (2-273; 64)\n"
|
||||
" mf=NAME Strumento per cercare corrispondenze\n"
|
||||
" (hc3, hc4, bt2, bt3, bt4; bt4)\n"
|
||||
" depth=NUM Profondità massima di ricerca; "
|
||||
"0=automatica\n"
|
||||
" (predefinito)"
|
||||
|
||||
#: src/xz/message.c:1181
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
|
||||
" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
|
||||
" --arm[=OPTS] ARM BCJ filter (little endian only)\n"
|
||||
" --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
|
||||
" --sparc[=OPTS] SPARC BCJ filter\n"
|
||||
" Valid OPTS for all BCJ filters:\n"
|
||||
" start=NUM start offset for conversions (default=0)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --x86[=OPZ] Filtro BCJ x86 (32 e 64 bit)\n"
|
||||
" --powerpc[=OPZ] Filtro BCJ PowerPC (solo big endian)\n"
|
||||
" --ia64[=OPZ] Filtro BCJ IA-64 (Itanium)\n"
|
||||
" --arm[=OPZ] Filtro BCJ ARM (solo little endian)\n"
|
||||
" --armthumb[=OPZ] Filtro BCJ ARM-Thumb (solo little endian)\n"
|
||||
" --sparc[=OPZ] Filtro BCJ SPARC\n"
|
||||
" OPZ valide per tutti i filtri BCJ:\n"
|
||||
" start=NUM Offset iniziale per le conversioni\n"
|
||||
" (predefinito=0)"
|
||||
|
||||
#: src/xz/message.c:1193
|
||||
msgid ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
|
||||
" dist=NUM distance between bytes being subtracted\n"
|
||||
" from each other (1-256; 1)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --delta[=OPZ] Filtro Delta; OPZ valide (valori validi; predefinito):\n"
|
||||
" dist=NUM Distanza tra byte sottratti\n"
|
||||
" gli uni dagli altri (1-256; 1)"
|
||||
|
||||
#: src/xz/message.c:1201
|
||||
msgid ""
|
||||
"\n"
|
||||
" Other options:\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Altre opzioni:\n"
|
||||
|
||||
#: src/xz/message.c:1204
|
||||
msgid ""
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors "
|
||||
"too\n"
|
||||
" -v, --verbose be verbose; specify twice for even more verbose"
|
||||
msgstr ""
|
||||
" -q, --quiet Sopprime gli avvisi; specificare due volte per "
|
||||
"sopprimere\n"
|
||||
" anche gli errori\n"
|
||||
" -v, --verbose Output prolisso; specificare due volte per output "
|
||||
"ancora\n"
|
||||
" più prolisso"
|
||||
|
||||
#: src/xz/message.c:1209
|
||||
msgid " -Q, --no-warn make warnings not affect the exit status"
|
||||
msgstr " -Q, --no-warn Gli avvisi non influenzano lo stato d'uscita"
|
||||
|
||||
#: src/xz/message.c:1211
|
||||
msgid ""
|
||||
" --robot use machine-parsable messages (useful for scripts)"
|
||||
msgstr " --robot Usa messaggi analizzabili (utile per gli script)"
|
||||
|
||||
#: src/xz/message.c:1214
|
||||
msgid ""
|
||||
" --info-memory display the total amount of RAM and the currently "
|
||||
"active\n"
|
||||
" memory usage limits, and exit"
|
||||
msgstr ""
|
||||
" --info-memory Visualizza la quantità totale di RAM, il limite "
|
||||
"attuale\n"
|
||||
" attivo di utilizzo della memore ed esce"
|
||||
|
||||
#: src/xz/message.c:1217
|
||||
msgid ""
|
||||
" -h, --help display the short help (lists only the basic options)\n"
|
||||
" -H, --long-help display this long help and exit"
|
||||
msgstr ""
|
||||
" -h, --help Stampa l'aiuto breve (elenca solo le opzioni di base)\n"
|
||||
" -H, --long-help Stampa questo lungo aiuto ed esce"
|
||||
|
||||
#: src/xz/message.c:1221
|
||||
msgid ""
|
||||
" -h, --help display this short help and exit\n"
|
||||
" -H, --long-help display the long help (lists also the advanced options)"
|
||||
msgstr ""
|
||||
" -h, --help Stampa questo breve aiuto ed esce\n"
|
||||
" -H, --long-help Stampa l'aiuto lungo (elenca anche le opzioni avanzate)"
|
||||
|
||||
#: src/xz/message.c:1226
|
||||
msgid " -V, --version display the version number and exit"
|
||||
msgstr " -V, --version Stampa il numero della versione ed esce"
|
||||
|
||||
#: src/xz/message.c:1228
|
||||
msgid ""
|
||||
"\n"
|
||||
"With no FILE, or when FILE is -, read standard input.\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Senza FILE, o quando FILE è -, legge lo standard input.\n"
|
||||
|
||||
#. TRANSLATORS: This message indicates the bug reporting address
|
||||
#. for this package. Please add _another line_ saying
|
||||
#. "Report translation bugs to <...>\n" with the email or WWW
|
||||
#. address for translation bugs. Thanks.
|
||||
#: src/xz/message.c:1234
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr ""
|
||||
"Segnalare i bug a <%s> (in inglese o finlandese).\n"
|
||||
"Segnalare i bug di traduzione a <tp@lists.linux.it>.\n"
|
||||
|
||||
#: src/xz/message.c:1236
|
||||
#, c-format
|
||||
msgid "%s home page: <%s>\n"
|
||||
msgstr "Sito web di %s: <%s>\n"
|
||||
|
||||
#: src/xz/options.c:86
|
||||
#, c-format
|
||||
msgid "%s: Options must be `name=value' pairs separated with commas"
|
||||
msgstr ""
|
||||
"%s: le opzioni devono essere coppie \"nome=valore\" separate da virgole"
|
||||
|
||||
#: src/xz/options.c:93
|
||||
#, c-format
|
||||
msgid "%s: Invalid option name"
|
||||
msgstr "%s: nome opzione non valido"
|
||||
|
||||
#: src/xz/options.c:113
|
||||
#, c-format
|
||||
msgid "%s: Invalid option value"
|
||||
msgstr "%s: valore dell'opzione non valido"
|
||||
|
||||
#: src/xz/options.c:247
|
||||
#, c-format
|
||||
msgid "Unsupported LZMA1/LZMA2 preset: %s"
|
||||
msgstr "Preset LZMA/LZMA2 non supportato: %s"
|
||||
|
||||
#: src/xz/options.c:355
|
||||
msgid "The sum of lc and lp must not exceed 4"
|
||||
msgstr "La somma di lc e lp non deve superare 4"
|
||||
|
||||
#: src/xz/options.c:359
|
||||
#, c-format
|
||||
msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
msgstr ""
|
||||
"Lo strumento per cercare corrispondenze selezionato richiede almeno nice=%"
|
||||
"<PRIu32>"
|
||||
|
||||
#: src/xz/suffix.c:79 src/xz/suffix.c:164
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr ""
|
||||
"%s: con --format=raw, --suffix=.SUF è richiesto a meno che non si scriva "
|
||||
"sullo stdout"
|
||||
|
||||
#: src/xz/suffix.c:99
|
||||
#, c-format
|
||||
msgid "%s: Filename has an unknown suffix, skipping"
|
||||
msgstr "%s: il nome del file ha un suffisso sconosciuto, viene saltato"
|
||||
|
||||
#: src/xz/suffix.c:154
|
||||
#, c-format
|
||||
msgid "%s: File already has `%s' suffix, skipping"
|
||||
msgstr "%s: il file ha già il suffisso \"%s\", viene saltato"
|
||||
|
||||
#: src/xz/suffix.c:205
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename suffix"
|
||||
msgstr "%s: suffisso del nome del file non valido"
|
||||
|
||||
#: src/xz/util.c:61
|
||||
#, c-format
|
||||
msgid "%s: Value is not a non-negative decimal integer"
|
||||
msgstr "%s: il valore non è un numero intero decimale non-negativo"
|
||||
|
||||
#: src/xz/util.c:103
|
||||
#, c-format
|
||||
msgid "%s: Invalid multiplier suffix"
|
||||
msgstr "%s: suffisso del moltiplicatore non valido"
|
||||
|
||||
#: src/xz/util.c:105
|
||||
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
|
||||
msgstr ""
|
||||
"I suffissi validi sono \"KiB\" (2^10), \"MiB\" (2^20), e \"GiB\" (2^30)."
|
||||
|
||||
#: src/xz/util.c:122
|
||||
#, c-format
|
||||
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
|
||||
msgstr ""
|
||||
"Il valore dell'opzione \"%s\" deve essere nell'intervallo [%<PRIu64>, %"
|
||||
"<PRIu64>]"
|
||||
|
||||
#: src/xz/util.c:247
|
||||
msgid "Empty filename, skipping"
|
||||
msgstr "Nome file vuoto, viene saltato"
|
||||
|
||||
#: src/xz/util.c:261
|
||||
msgid "Compressed data cannot be read from a terminal"
|
||||
msgstr "I dati compressi non possono essere letti da un terminale"
|
||||
|
||||
#: src/xz/util.c:274
|
||||
msgid "Compressed data cannot be written to a terminal"
|
||||
msgstr "I dati compressi non possono essere scritti ad un terminale"
|
||||
|
||||
#: src/common/tuklib_exit.c:39
|
||||
msgid "Writing to standard output failed"
|
||||
msgstr "Scrittura sullo standard ouput non riuscita"
|
||||
|
||||
#: src/common/tuklib_exit.c:42
|
||||
msgid "Unknown error"
|
||||
msgstr "Errore sconosciuto"
|
||||
825
po/pl.po
Normal file
825
po/pl.po
Normal file
@@ -0,0 +1,825 @@
|
||||
# Polish translation for xz.
|
||||
# This file is in the public domain.
|
||||
# Jakub Bogusz <qboosh@pld-linux.org>, 2011.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz 5.0.1\n"
|
||||
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
|
||||
"POT-Creation-Date: 2011-01-28 20:01+0200\n"
|
||||
"PO-Revision-Date: 2011-02-02 16:51+0100\n"
|
||||
"Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
|
||||
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
|
||||
"Language: pl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||
|
||||
#: src/xz/args.c:333
|
||||
#, c-format
|
||||
msgid "%s: Unknown file format type"
|
||||
msgstr "%s: Nieznany typ formatu pliku"
|
||||
|
||||
#: src/xz/args.c:356 src/xz/args.c:364
|
||||
#, c-format
|
||||
msgid "%s: Unsupported integrity check type"
|
||||
msgstr "%s: Nieobsługiwany typ kontroli spójności"
|
||||
|
||||
#: src/xz/args.c:382
|
||||
msgid "Only one file can be specified with `--files' or `--files0'."
|
||||
msgstr "Wraz z opcją `--files' lub `--files0' można podać tylko jeden plik."
|
||||
|
||||
#: src/xz/args.c:445
|
||||
#, c-format
|
||||
msgid "The environment variable %s contains too many arguments"
|
||||
msgstr "Zmienna środowiskowa %s zawiera zbyt dużo argumentów"
|
||||
|
||||
#: src/xz/coder.c:95
|
||||
msgid "Maximum number of filters is four"
|
||||
msgstr "Maksymalna liczba filtrów to cztery"
|
||||
|
||||
#: src/xz/coder.c:108
|
||||
msgid "Memory usage limit is too low for the given filter setup."
|
||||
msgstr "Limit użycia pamięci jest zbyt mały dla podanej konfiguracji filtra."
|
||||
|
||||
#: src/xz/coder.c:129
|
||||
msgid "Using a preset in raw mode is discouraged."
|
||||
msgstr "Użycie ustawień predefiniowanych w trybie surowym jest odradzane."
|
||||
|
||||
#: src/xz/coder.c:131
|
||||
msgid "The exact options of the presets may vary between software versions."
|
||||
msgstr "Dokładne opcje ustawień predefiniowanych mogą różnić się między wersjami oprogramowania."
|
||||
|
||||
#: src/xz/coder.c:157
|
||||
msgid "The .lzma format supports only the LZMA1 filter"
|
||||
msgstr "Format .lzma obsługuje tylko filtr LZMA1"
|
||||
|
||||
#: src/xz/coder.c:165
|
||||
msgid "LZMA1 cannot be used with the .xz format"
|
||||
msgstr "LZMA1 nie może być używany z formatem .xz"
|
||||
|
||||
#: src/xz/coder.c:182
|
||||
msgid "Unsupported filter chain or filter options"
|
||||
msgstr "Nieobsługiwany łańcuch filtrów lub opcje filtra"
|
||||
|
||||
#: src/xz/coder.c:190
|
||||
#, c-format
|
||||
msgid "Decompression will need %s MiB of memory."
|
||||
msgstr "Dekompresja będzie wymagała %s MiB pamięci."
|
||||
|
||||
#: src/xz/coder.c:247
|
||||
#, c-format
|
||||
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "Skorygowano rozmiar słownika LZMA%c z %s MiB do %s MiB aby nie przekroczyć limitu użycia pamięci %s MiB"
|
||||
|
||||
#. TRANSLATORS: When compression or decompression finishes,
|
||||
#. and xz is going to remove the source file, xz first checks
|
||||
#. if the source file still exists, and if it does, does its
|
||||
#. device and inode numbers match what xz saw when it opened
|
||||
#. the source file. If these checks fail, this message is
|
||||
#. shown, %s being the filename, and the file is not deleted.
|
||||
#. The check for device and inode numbers is there, because
|
||||
#. it is possible that the user has put a new file in place
|
||||
#. of the original file, and in that case it obviously
|
||||
#. shouldn't be removed.
|
||||
#: src/xz/file_io.c:137
|
||||
#, c-format
|
||||
msgid "%s: File seems to have been moved, not removing"
|
||||
msgstr "%s: Plik wygląda na przeniesiony, nie zostanie usunięty"
|
||||
|
||||
#: src/xz/file_io.c:144 src/xz/file_io.c:589
|
||||
#, c-format
|
||||
msgid "%s: Cannot remove: %s"
|
||||
msgstr "%s: Nie można usunąć: %s"
|
||||
|
||||
#: src/xz/file_io.c:169
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file owner: %s"
|
||||
msgstr "%s: Nie można ustawić właściciela pliku: %s"
|
||||
|
||||
#: src/xz/file_io.c:175
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file group: %s"
|
||||
msgstr "%s: Nie można ustawić grupy pliku: %s"
|
||||
|
||||
#: src/xz/file_io.c:194
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file permissions: %s"
|
||||
msgstr "%s: Nie można ustawić uprawnień pliku: %s"
|
||||
|
||||
#: src/xz/file_io.c:337 src/xz/file_io.c:420
|
||||
#, c-format
|
||||
msgid "%s: Is a symbolic link, skipping"
|
||||
msgstr "%s: Jest dowiązaniem symbolicznym, pominięto"
|
||||
|
||||
#: src/xz/file_io.c:455
|
||||
#, c-format
|
||||
msgid "%s: Is a directory, skipping"
|
||||
msgstr "%s: Jest katalogiem, pominięto"
|
||||
|
||||
#: src/xz/file_io.c:461
|
||||
#, c-format
|
||||
msgid "%s: Not a regular file, skipping"
|
||||
msgstr "%s: Nie jest zwykłym plikiem, pominięto"
|
||||
|
||||
#: src/xz/file_io.c:478
|
||||
#, c-format
|
||||
msgid "%s: File has setuid or setgid bit set, skipping"
|
||||
msgstr "%s: Plik ma ustawiony bit setuid lub setgid, pominięto"
|
||||
|
||||
#: src/xz/file_io.c:485
|
||||
#, c-format
|
||||
msgid "%s: File has sticky bit set, skipping"
|
||||
msgstr "%s: Plik ma ustawiony bit sticky, pominięto"
|
||||
|
||||
#: src/xz/file_io.c:492
|
||||
#, c-format
|
||||
msgid "%s: Input file has more than one hard link, skipping"
|
||||
msgstr "%s: Plik wejściowy ma więcej niż jedno dowiązanie zwykłe, pominięto"
|
||||
|
||||
#: src/xz/file_io.c:713
|
||||
#, c-format
|
||||
msgid "Error restoring the O_APPEND flag to standard output: %s"
|
||||
msgstr "Błąd podczas odtwarzania flagi O_APPEND dla standardowego wyjścia: %s"
|
||||
|
||||
#: src/xz/file_io.c:725
|
||||
#, c-format
|
||||
msgid "%s: Closing the file failed: %s"
|
||||
msgstr "%s: Zamknięcie pliku nie powiodło się: %s"
|
||||
|
||||
#: src/xz/file_io.c:761 src/xz/file_io.c:945
|
||||
#, c-format
|
||||
msgid "%s: Seeking failed when trying to create a sparse file: %s"
|
||||
msgstr "%s: Zmiana pozycji nie powiodła się podczas próby utworzenia pliku rzadkiego: %s"
|
||||
|
||||
#: src/xz/file_io.c:820
|
||||
#, c-format
|
||||
msgid "%s: Read error: %s"
|
||||
msgstr "%s: Błąd odczytu: %s"
|
||||
|
||||
#: src/xz/file_io.c:843
|
||||
#, c-format
|
||||
msgid "%s: Error seeking the file: %s"
|
||||
msgstr "%s: Błąd podczas zmiany pozycji w pliku: %s"
|
||||
|
||||
#: src/xz/file_io.c:853
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of file"
|
||||
msgstr "%s: Nieoczekiwany koniec pliku"
|
||||
|
||||
#: src/xz/file_io.c:903
|
||||
#, c-format
|
||||
msgid "%s: Write error: %s"
|
||||
msgstr "%s: Błąd zapisu: %s"
|
||||
|
||||
#: src/xz/hardware.c:100
|
||||
msgid "Disabled"
|
||||
msgstr "Wyłączony"
|
||||
|
||||
#. TRANSLATORS: Test with "xz --info-memory" to see if
|
||||
#. the alignment looks nice.
|
||||
#: src/xz/hardware.c:119
|
||||
msgid "Total amount of physical memory (RAM): "
|
||||
msgstr "Całkowita ilość pamięci fizycznej (RAM): "
|
||||
|
||||
#: src/xz/hardware.c:121
|
||||
msgid "Memory usage limit for compression: "
|
||||
msgstr "Limit użycia pamięci dla kompresji: "
|
||||
|
||||
#: src/xz/hardware.c:123
|
||||
msgid "Memory usage limit for decompression: "
|
||||
msgstr "Limit użycia pamięci dla dekompresji: "
|
||||
|
||||
#. TRANSLATORS: Indicates that there is no integrity check.
|
||||
#. This string is used in tables, so the width must not
|
||||
#. exceed ten columns with a fixed-width font.
|
||||
#: src/xz/list.c:62
|
||||
msgid "None"
|
||||
msgstr "Brak"
|
||||
|
||||
#. TRANSLATORS: Indicates that integrity check name is not known,
|
||||
#. but the Check ID is known (here 2). This and other "Unknown-N"
|
||||
#. strings are used in tables, so the width must not exceed ten
|
||||
#. columns with a fixed-width font. It's OK to omit the dash if
|
||||
#. you need space for one extra letter, but don't use spaces.
|
||||
#: src/xz/list.c:69
|
||||
msgid "Unknown-2"
|
||||
msgstr "Nieznany-2"
|
||||
|
||||
#: src/xz/list.c:70
|
||||
msgid "Unknown-3"
|
||||
msgstr "Nieznany-3"
|
||||
|
||||
#: src/xz/list.c:72
|
||||
msgid "Unknown-5"
|
||||
msgstr "Nieznany-5"
|
||||
|
||||
#: src/xz/list.c:73
|
||||
msgid "Unknown-6"
|
||||
msgstr "Nieznany-6"
|
||||
|
||||
#: src/xz/list.c:74
|
||||
msgid "Unknown-7"
|
||||
msgstr "Nieznany-7"
|
||||
|
||||
#: src/xz/list.c:75
|
||||
msgid "Unknown-8"
|
||||
msgstr "Nieznany-8"
|
||||
|
||||
#: src/xz/list.c:76
|
||||
msgid "Unknown-9"
|
||||
msgstr "Nieznany-9"
|
||||
|
||||
#: src/xz/list.c:78
|
||||
msgid "Unknown-11"
|
||||
msgstr "Nieznany11"
|
||||
|
||||
#: src/xz/list.c:79
|
||||
msgid "Unknown-12"
|
||||
msgstr "Nieznany12"
|
||||
|
||||
#: src/xz/list.c:80
|
||||
msgid "Unknown-13"
|
||||
msgstr "Nieznany13"
|
||||
|
||||
#: src/xz/list.c:81
|
||||
msgid "Unknown-14"
|
||||
msgstr "Nieznany14"
|
||||
|
||||
#: src/xz/list.c:82
|
||||
msgid "Unknown-15"
|
||||
msgstr "Nieznany15"
|
||||
|
||||
#: src/xz/list.c:126
|
||||
#, c-format
|
||||
msgid "%s: File is empty"
|
||||
msgstr "%s: Plik jest pusty"
|
||||
|
||||
#: src/xz/list.c:131
|
||||
#, c-format
|
||||
msgid "%s: Too small to be a valid .xz file"
|
||||
msgstr "%s: Za mały na poprawny plik .xz"
|
||||
|
||||
#. TRANSLATORS: These are column headings. From Strms (Streams)
|
||||
#. to Ratio, the columns are right aligned. Check and Filename
|
||||
#. are left aligned. If you need longer words, it's OK to
|
||||
#. use two lines here. Test with "xz -l foo.xz".
|
||||
#: src/xz/list.c:612
|
||||
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
|
||||
msgstr "Strum. Bloki Spakowany Rozpakowany Wsp. Kontrola Nazwa pliku"
|
||||
|
||||
#: src/xz/list.c:652
|
||||
#, c-format
|
||||
msgid " Streams: %s\n"
|
||||
msgstr " Strumienie: %s\n"
|
||||
|
||||
#: src/xz/list.c:654
|
||||
#, c-format
|
||||
msgid " Blocks: %s\n"
|
||||
msgstr " Bloki: %s\n"
|
||||
|
||||
#: src/xz/list.c:656
|
||||
#, c-format
|
||||
msgid " Compressed size: %s\n"
|
||||
msgstr " Rozmiar spakowany: %s\n"
|
||||
|
||||
#: src/xz/list.c:659
|
||||
#, c-format
|
||||
msgid " Uncompressed size: %s\n"
|
||||
msgstr " Rozmiar rozpakowany: %s\n"
|
||||
|
||||
#: src/xz/list.c:662
|
||||
#, c-format
|
||||
msgid " Ratio: %s\n"
|
||||
msgstr " Współczynnik: %s\n"
|
||||
|
||||
#: src/xz/list.c:664
|
||||
#, c-format
|
||||
msgid " Check: %s\n"
|
||||
msgstr " Kontrola spójności: %s\n"
|
||||
|
||||
#: src/xz/list.c:665
|
||||
#, c-format
|
||||
msgid " Stream padding: %s\n"
|
||||
msgstr " Wyrównanie strumienia: %s\n"
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All except
|
||||
#. Check are right aligned; Check is left aligned. Test with
|
||||
#. "xz -lv foo.xz".
|
||||
#: src/xz/list.c:693
|
||||
msgid ""
|
||||
" Streams:\n"
|
||||
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
|
||||
msgstr ""
|
||||
" Strumienie:\n"
|
||||
" Strumień Bloki Offset spak. Offset rozp. Rozm.spak. Rozm.rozp. Wsp. Kontrola Wyrównanie"
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All
|
||||
#. except Check are right aligned; Check is left aligned.
|
||||
#: src/xz/list.c:748
|
||||
#, c-format
|
||||
msgid ""
|
||||
" Blocks:\n"
|
||||
" Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
|
||||
msgstr ""
|
||||
" Bloki:\n"
|
||||
" Strumień Blok Offset spak. Offset rozp. Rozm.całkowity Rozm.rozp. Wsp. Kontrola"
|
||||
|
||||
#. TRANSLATORS: These are additional column headings
|
||||
#. for the most verbose listing mode. CheckVal
|
||||
#. (Check value), Flags, and Filters are left aligned.
|
||||
#. Header (Block Header Size), CompSize, and MemUsage
|
||||
#. are right aligned. %*s is replaced with 0-120
|
||||
#. spaces to make the CheckVal column wide enough.
|
||||
#. Test with "xz -lvv foo.xz".
|
||||
#: src/xz/list.c:760
|
||||
#, c-format
|
||||
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
|
||||
msgstr " S.kontr. %*sNagłówek Flagi Rozm. spak. Uż.pamięci Filtry"
|
||||
|
||||
#: src/xz/list.c:838 src/xz/list.c:1007
|
||||
#, c-format
|
||||
msgid " Memory needed: %s MiB\n"
|
||||
msgstr " Wymagana pamięć: %s MiB\n"
|
||||
|
||||
#: src/xz/list.c:840 src/xz/list.c:1009
|
||||
#, c-format
|
||||
msgid " Sizes in headers: %s\n"
|
||||
msgstr " Rozmiar w nagłówkach: %s\n"
|
||||
|
||||
#: src/xz/list.c:841 src/xz/list.c:1010
|
||||
msgid "Yes"
|
||||
msgstr "Tak"
|
||||
|
||||
#: src/xz/list.c:841 src/xz/list.c:1010
|
||||
msgid "No"
|
||||
msgstr "Nie"
|
||||
|
||||
#. TRANSLATORS: %s is an integer. Only the plural form of this
|
||||
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
|
||||
#: src/xz/list.c:986
|
||||
#, c-format
|
||||
msgid "%s file\n"
|
||||
msgid_plural "%s files\n"
|
||||
msgstr[0] "%s plik\n"
|
||||
msgstr[1] "%s pliki\n"
|
||||
msgstr[2] "%s plików\n"
|
||||
|
||||
#: src/xz/list.c:999
|
||||
msgid "Totals:"
|
||||
msgstr "Sumarycznie:"
|
||||
|
||||
#: src/xz/list.c:1000
|
||||
#, c-format
|
||||
msgid " Number of files: %s\n"
|
||||
msgstr " Liczba plików: %s\n"
|
||||
|
||||
#: src/xz/list.c:1072
|
||||
msgid "--list works only on .xz files (--format=xz or --format=auto)"
|
||||
msgstr "--list działa tylko z plikami .xz (--format=xz lub --format=auto)"
|
||||
|
||||
#: src/xz/list.c:1078
|
||||
msgid "--list does not support reading from standard input"
|
||||
msgstr "--list nie obsługuje odczytu ze standardowego wejścia"
|
||||
|
||||
#: src/xz/main.c:89
|
||||
#, c-format
|
||||
msgid "%s: Error reading filenames: %s"
|
||||
msgstr "%s: Błąd odczytu nazw plików: %s"
|
||||
|
||||
#: src/xz/main.c:96
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of input when reading filenames"
|
||||
msgstr "%s: Nieoczekiwany koniec wejścia podczas odczytu nazw plików"
|
||||
|
||||
#: src/xz/main.c:120
|
||||
#, c-format
|
||||
msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
|
||||
msgstr "%s: Napotkano znak NUL podczas odczytu nazw plików; może miało być `--files0' zamiast `--files'?"
|
||||
|
||||
#: src/xz/main.c:174
|
||||
msgid "Compression and decompression with --robot are not supported yet."
|
||||
msgstr "Kompresja i dekompresja z opcją --robot nie jest jeszcze obsługiwana."
|
||||
|
||||
#: src/xz/main.c:231
|
||||
msgid "Cannot read data from standard input when reading filenames from standard input"
|
||||
msgstr "Nie można odczytać danych ze standardowego wejścia przy czytaniu nazw plików ze standardowego wejścia"
|
||||
|
||||
#: src/xz/message.c:792 src/xz/message.c:842
|
||||
msgid "Internal error (bug)"
|
||||
msgstr "Błąd wewnętrzny"
|
||||
|
||||
#: src/xz/message.c:799
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr "Nie można ustawić obsługi sygnałów"
|
||||
|
||||
#: src/xz/message.c:808
|
||||
msgid "No integrity check; not verifying file integrity"
|
||||
msgstr "Brak kontroli spójności; poprawność plików nie będzie weryfikowana"
|
||||
|
||||
#: src/xz/message.c:811
|
||||
msgid "Unsupported type of integrity check; not verifying file integrity"
|
||||
msgstr "Nieobsługiwany typ kontroli spójności; poprawność plików nie będzie weryfikowana"
|
||||
|
||||
#: src/xz/message.c:818
|
||||
msgid "Memory usage limit reached"
|
||||
msgstr "Osiągnięto limit użycia pamięci"
|
||||
|
||||
#: src/xz/message.c:821
|
||||
msgid "File format not recognized"
|
||||
msgstr "Nie rozpoznany format pliku"
|
||||
|
||||
#: src/xz/message.c:824
|
||||
msgid "Unsupported options"
|
||||
msgstr "Nieobsługiwane opcje"
|
||||
|
||||
#: src/xz/message.c:827
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr "Dane skompresowane są uszkodzone"
|
||||
|
||||
#: src/xz/message.c:830
|
||||
msgid "Unexpected end of input"
|
||||
msgstr "Nieoczekiwany koniec wejścia"
|
||||
|
||||
#: src/xz/message.c:881
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limit is %s."
|
||||
msgstr "Wymagane jest %s MiB pamięci. Limit to %s."
|
||||
|
||||
#: src/xz/message.c:1048
|
||||
#, c-format
|
||||
msgid "%s: Filter chain: %s\n"
|
||||
msgstr "%s: Łańcuch filtrów: %s\n"
|
||||
|
||||
#: src/xz/message.c:1058
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Polecenie `%s --help' pokaże więcej informacji."
|
||||
|
||||
#: src/xz/message.c:1084
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
"Compress or decompress FILEs in the .xz format.\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Składnia: %s [OPCJA]... [PLIK]...\n"
|
||||
"Kompresja lub dekompresja PLIKÓW w formacie .xz.\n"
|
||||
"\n"
|
||||
|
||||
#: src/xz/message.c:1091
|
||||
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr ""
|
||||
"Argumenty obowiązkowe dla opcji długich są obowiązkowe również dla opcji\n"
|
||||
"krótkich.\n"
|
||||
|
||||
#: src/xz/message.c:1095
|
||||
msgid " Operation mode:\n"
|
||||
msgstr " Tryb pracy:\n"
|
||||
|
||||
#: src/xz/message.c:1098
|
||||
msgid ""
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
" -t, --test test compressed file integrity\n"
|
||||
" -l, --list list information about .xz files"
|
||||
msgstr ""
|
||||
" -z, --compress wymuszenie kompresji\n"
|
||||
" -d, --decompress wymuszenie dekompresji\n"
|
||||
" -t, --test sprawdzenie spójności plików skompresowanych\n"
|
||||
" -l, --list wypisanie informacji o plikach .xz"
|
||||
|
||||
#: src/xz/message.c:1104
|
||||
msgid ""
|
||||
"\n"
|
||||
" Operation modifiers:\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Modyfikatory operacji:\n"
|
||||
|
||||
#: src/xz/message.c:1107
|
||||
msgid ""
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
" -c, --stdout write to standard output and don't delete input files"
|
||||
msgstr ""
|
||||
" -k, --keep zachowanie (nieusuwanie) plików wejściowych\n"
|
||||
" -f, --force nadpisywanie plików wyjściowych i (de)kompresja dowiązań\n"
|
||||
" -c, --stdout zapis na standardowe wyjście, nieusuwanie plików wej."
|
||||
|
||||
#: src/xz/message.c:1113
|
||||
msgid ""
|
||||
" --no-sparse do not create sparse files when decompressing\n"
|
||||
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
" --files[=FILE] read filenames to process from FILE; if FILE is\n"
|
||||
" omitted, filenames are read from the standard input;\n"
|
||||
" filenames must be terminated with the newline character\n"
|
||||
" --files0[=FILE] like --files but use the null character as terminator"
|
||||
msgstr ""
|
||||
" --no-sparse nietworzenie plików rzadkich podczas dekompresji\n"
|
||||
" -S, --suffix=.ROZ użycie rozszerzenia `.ROZ' dla plików skompresowanych\n"
|
||||
" --files[=PLIK] odczyt nazw plików do przetworzenia z PLIKU; jeśli PLIK\n"
|
||||
" nie został podany, nazwy są czytane ze standardowego\n"
|
||||
" wejścia; muszą być zakończone znakiem nowej linii\n"
|
||||
" --files0[=PLIK] podobnie do --files, ale znakiem kończącym musi być NUL"
|
||||
|
||||
#: src/xz/message.c:1121
|
||||
msgid ""
|
||||
"\n"
|
||||
" Basic file format and compression options:\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Podstawowe opcje formatu pliku i kompresji:\n"
|
||||
|
||||
#: src/xz/message.c:1123
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', and `raw'\n"
|
||||
" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
|
||||
" `crc32', `crc64' (default), or `sha256'"
|
||||
msgstr ""
|
||||
" -F, --format=FORM format pliki do kodowania lub dekodowania; możliwe to\n"
|
||||
" `auto' (domyślny), `xz', 'lzma' i `raw'\n"
|
||||
" -C, --check=TEST typ kontroli spójności: `none' (ostrożnie!),\n"
|
||||
" `crc32', `crc64' (domyślny) lub `sha256'"
|
||||
|
||||
#: src/xz/message.c:1130
|
||||
msgid ""
|
||||
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
|
||||
" decompressor memory usage into account before using 7-9!"
|
||||
msgstr ""
|
||||
" -0 ... -9 predefiniowane opcje kompresji; domyślna to 6; przed\n"
|
||||
" użyciem wartości 7-9 należy wziąć pod uwagę wykorzystanie\n"
|
||||
" pamięci przy kompresji *oraz* dekompresji!"
|
||||
|
||||
#: src/xz/message.c:1134
|
||||
msgid ""
|
||||
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
|
||||
" does not affect decompressor memory requirements"
|
||||
msgstr ""
|
||||
" -e, --extreme próba poprawy współczynnika kompresji z użyciem większej\n"
|
||||
" ilości czasu procesora; nie wpływa na wymagania\n"
|
||||
" pamięciowe dekompresora"
|
||||
|
||||
#: src/xz/message.c:1139
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT\n"
|
||||
" set memory usage limit for compression, decompression,\n"
|
||||
" or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
|
||||
msgstr ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT\n"
|
||||
" ustawienie limitu użycia pamięci dla kompresji,\n"
|
||||
" dekompresji lub obu; LIMIT jest w bajtach, % RAM lub 0\n"
|
||||
" dla limitów domyślnych"
|
||||
|
||||
#: src/xz/message.c:1146
|
||||
msgid ""
|
||||
" --no-adjust if compression settings exceed the memory usage limit,\n"
|
||||
" give an error instead of adjusting the settings downwards"
|
||||
msgstr ""
|
||||
" --no-adjust jeśli ustawienia kompresji przekraczają limit użycia\n"
|
||||
" pamięci, zostanie zgłoszony błąd zamiast zmniejszania\n"
|
||||
" ustawień"
|
||||
|
||||
#: src/xz/message.c:1152
|
||||
msgid ""
|
||||
"\n"
|
||||
" Custom filter chain for compression (alternative for using presets):"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Łańcuch własnych filtrów do kompresji (alternatywa do używania -0 .. -9):"
|
||||
|
||||
#: src/xz/message.c:1161
|
||||
msgid ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
|
||||
" --lzma2[=OPTS] more of the following options (valid values; default):\n"
|
||||
" preset=PRE reset options to a preset (0-9[e])\n"
|
||||
" dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n"
|
||||
" lc=NUM number of literal context bits (0-4; 3)\n"
|
||||
" lp=NUM number of literal position bits (0-4; 0)\n"
|
||||
" pb=NUM number of position bits (0-4; 2)\n"
|
||||
" mode=MODE compression mode (fast, normal; normal)\n"
|
||||
" nice=NUM nice length of a match (2-273; 64)\n"
|
||||
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
|
||||
" depth=NUM maximum search depth; 0=automatic (default)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --lzma1[=OPCJE] LZMA1 lub LZMA2; OPCJE to oddzielona przecinkami lista\n"
|
||||
" --lzma2[=OPCJE] zera lub więcej następujących opcji (w nawiasach wartości\n"
|
||||
" poprawne; domyślne):\n"
|
||||
" preset=PRE ustawienie opcji na predefiniowane (0-9[e])\n"
|
||||
" dict=ILE rozmiar słownika (4KiB - 1536MiB; 8MiB)\n"
|
||||
" lc=ILE liczba bitów kontekstu literału (0-4; 3)\n"
|
||||
" lp=ILE liczba bitów pozycji literału (0-4; 0)\n"
|
||||
" pp=ILE liczba bitów pozycji (0-4; 2)\n"
|
||||
" mode=TRYB tryb kompresji (fast, normal; normal)\n"
|
||||
" nice=ILE długość dopasowania (2-273; 64)\n"
|
||||
" mf=NAZWA dopasowywacz (hc3, hc4, bt2, bt3, bt4; bt4)\n"
|
||||
" depth=ILE maks. głębokość szukania; 0=auto (domyślne)"
|
||||
|
||||
#: src/xz/message.c:1176
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
|
||||
" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
|
||||
" --arm[=OPTS] ARM BCJ filter (little endian only)\n"
|
||||
" --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
|
||||
" --sparc[=OPTS] SPARC BCJ filter\n"
|
||||
" Valid OPTS for all BCJ filters:\n"
|
||||
" start=NUM start offset for conversions (default=0)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --x86[=OPCJE] Filtr BCJ x86 (32-bitowy lub 64-bitowy)\n"
|
||||
" --powerpc[=OPCJE] Filtr BCJ PowerPC (tylko big-endian)\n"
|
||||
" --ia64[=OPCJE] Filtr BCJ IA-64 (Itanium)\n"
|
||||
" --arm[=OPCJE] Filtr BCJ ARM (tylko little-endian)\n"
|
||||
" --armthumb[=OPCJE] Filtr BCJ ARM-Thumb (tylko little-endian)\n"
|
||||
" --sparc[=OPCJE] Filtr BCJ SPARC\n"
|
||||
" Poprawne OPCJE dla wszystkich filtrów BCJ:\n"
|
||||
" start=ILE offset początku konwersji (domyślnie=0)"
|
||||
|
||||
#: src/xz/message.c:1188
|
||||
msgid ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
|
||||
" dist=NUM distance between bytes being subtracted\n"
|
||||
" from each other (1-256; 1)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --delta[=OPCJE] Filtr delta; poprawne OPCJE (poprawne wart.; domyślne):\n"
|
||||
" dist=ILE odległość między bajtami odejmowanymi od\n"
|
||||
" siebie (1-256; 1)"
|
||||
|
||||
#: src/xz/message.c:1196
|
||||
msgid ""
|
||||
"\n"
|
||||
" Other options:\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Inne opcje:\n"
|
||||
|
||||
#: src/xz/message.c:1199
|
||||
msgid ""
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
|
||||
" -v, --verbose be verbose; specify twice for even more verbose"
|
||||
msgstr ""
|
||||
" -q, --quiet pominięcie ostrzeżeń; dwukrotne podanie pomija też błędy\n"
|
||||
" -v, --verbose więcej informacji; dwukrotne podanie to jeszcze więcej"
|
||||
|
||||
#: src/xz/message.c:1204
|
||||
msgid " -Q, --no-warn make warnings not affect the exit status"
|
||||
msgstr " -Q, --no-warn ostrzeżenia nie mają wpływu na status zakończenia"
|
||||
|
||||
#: src/xz/message.c:1206
|
||||
msgid " --robot use machine-parsable messages (useful for scripts)"
|
||||
msgstr " --robot komunikaty w formacie dla maszyny (do skryptów)"
|
||||
|
||||
#: src/xz/message.c:1209
|
||||
msgid ""
|
||||
" --info-memory display the total amount of RAM and the currently active\n"
|
||||
" memory usage limits, and exit"
|
||||
msgstr ""
|
||||
" --info-memory wyświetlenie całkowitej ilości pamięci RAM oraz aktualnie\n"
|
||||
" aktywnych limitów pamięci i zakończenie pracy"
|
||||
|
||||
#: src/xz/message.c:1212
|
||||
msgid ""
|
||||
" -h, --help display the short help (lists only the basic options)\n"
|
||||
" -H, --long-help display this long help and exit"
|
||||
msgstr ""
|
||||
" -h, --help wyświetlenie krótkiego opisu (tylko podstawowe opcje)\n"
|
||||
" -H, --long-help wyświetlenie tego długiego opisu i zakończenie"
|
||||
|
||||
#: src/xz/message.c:1216
|
||||
msgid ""
|
||||
" -h, --help display this short help and exit\n"
|
||||
" -H, --long-help display the long help (lists also the advanced options)"
|
||||
msgstr ""
|
||||
" -h, --help wyświetlenie tego krótkiego opisu i zakończenie\n"
|
||||
" -H, --long-help wyświetlenie długiego opisu (także opcje zaawansowane)"
|
||||
|
||||
#: src/xz/message.c:1221
|
||||
msgid " -V, --version display the version number and exit"
|
||||
msgstr " -V, --version wyświetlenie informacji o wersji i zakończenie"
|
||||
|
||||
#: src/xz/message.c:1223
|
||||
msgid ""
|
||||
"\n"
|
||||
"With no FILE, or when FILE is -, read standard input.\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Jeśli nie podano PLIKU lub PLIK to -, czytane jest standardowe wejście.\n"
|
||||
|
||||
#. TRANSLATORS: This message indicates the bug reporting address
|
||||
#. for this package. Please add _another line_ saying
|
||||
#. "Report translation bugs to <...>\n" with the email or WWW
|
||||
#. address for translation bugs. Thanks.
|
||||
#: src/xz/message.c:1229
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr ""
|
||||
"Błędy prosimy zgłaszać na adres <%s>\n"
|
||||
"(w języku angielskim lub fińskim).\n"
|
||||
"Błędy w tłumaczeniu prosimy zgłaszać na adres\n"
|
||||
"<translation-team-pl@lists.sourceforge.net>.\n"
|
||||
|
||||
#: src/xz/message.c:1231
|
||||
#, c-format
|
||||
msgid "%s home page: <%s>\n"
|
||||
msgstr "Strona domowa %s: <%s>\n"
|
||||
|
||||
#: src/xz/options.c:86
|
||||
#, c-format
|
||||
msgid "%s: Options must be `name=value' pairs separated with commas"
|
||||
msgstr "%s: Opcje muszą być parami `nazwa=wartość' rozdzielonymi przecinkami"
|
||||
|
||||
#: src/xz/options.c:93
|
||||
#, c-format
|
||||
msgid "%s: Invalid option name"
|
||||
msgstr "%s: Błędna nazwa opcji"
|
||||
|
||||
#: src/xz/options.c:113
|
||||
#, c-format
|
||||
msgid "%s: Invalid option value"
|
||||
msgstr "%s: Błędna wartość opcji"
|
||||
|
||||
#: src/xz/options.c:247
|
||||
#, c-format
|
||||
msgid "Unsupported LZMA1/LZMA2 preset: %s"
|
||||
msgstr "Nieobsługiwane ustawienie predefiniowane LZMA1/LZMA2: %s"
|
||||
|
||||
#: src/xz/options.c:355
|
||||
msgid "The sum of lc and lp must not exceed 4"
|
||||
msgstr "Suma lc i lp nie może przekroczyć 4"
|
||||
|
||||
#: src/xz/options.c:359
|
||||
#, c-format
|
||||
msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
msgstr "Wybrany dopasowywacz wymaga przynajmniej nice=%<PRIu32>"
|
||||
|
||||
#: src/xz/suffix.c:104 src/xz/suffix.c:189
|
||||
#, c-format
|
||||
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr "%s: Przy --format=raw i zapisie do pliku wymagana jest opcja --suffix=.ROZ"
|
||||
|
||||
#: src/xz/suffix.c:124
|
||||
#, c-format
|
||||
msgid "%s: Filename has an unknown suffix, skipping"
|
||||
msgstr "%s: Nazwa pliku ma nieznane rozszerzenie, pominięto"
|
||||
|
||||
#: src/xz/suffix.c:179
|
||||
#, c-format
|
||||
msgid "%s: File already has `%s' suffix, skipping"
|
||||
msgstr "%s: Plik już ma rozszerzenie `%s', pominięto"
|
||||
|
||||
#: src/xz/suffix.c:230
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename suffix"
|
||||
msgstr "%s: Błędne rozszerzenie nazwy pliku"
|
||||
|
||||
#: src/xz/util.c:61
|
||||
#, c-format
|
||||
msgid "%s: Value is not a non-negative decimal integer"
|
||||
msgstr "%s: Wartość nie jest nieujemną liczbą całkowitą"
|
||||
|
||||
#: src/xz/util.c:103
|
||||
#, c-format
|
||||
msgid "%s: Invalid multiplier suffix"
|
||||
msgstr "%s: Błędny przyrostek mnożnika"
|
||||
|
||||
#: src/xz/util.c:105
|
||||
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
|
||||
msgstr "Poprawne przyrostki to `KiB' (2^10), `MiB' (2^20) i `GiB' (2^30)."
|
||||
|
||||
#: src/xz/util.c:122
|
||||
#, c-format
|
||||
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
|
||||
msgstr "Wartość opcji `%s' musi być w przedziale [%<PRIu64>, %<PRIu64>]"
|
||||
|
||||
#: src/xz/util.c:247
|
||||
msgid "Empty filename, skipping"
|
||||
msgstr "Pusta nazwa pliku, pominięto"
|
||||
|
||||
#: src/xz/util.c:261
|
||||
msgid "Compressed data cannot be read from a terminal"
|
||||
msgstr "Dane skompresowane nie mogą być czytane z terminala"
|
||||
|
||||
#: src/xz/util.c:274
|
||||
msgid "Compressed data cannot be written to a terminal"
|
||||
msgstr "Dane skompresowane nie mogą być zapisywane na terminal"
|
||||
|
||||
#: src/common/tuklib_exit.c:39
|
||||
msgid "Writing to standard output failed"
|
||||
msgstr "Zapis na standardowe wyjście nie powiódł się"
|
||||
|
||||
#: src/common/tuklib_exit.c:42
|
||||
msgid "Unknown error"
|
||||
msgstr "Nieznany błąd"
|
||||
@@ -1,16 +1,22 @@
|
||||
##
|
||||
## Copyright (C) 2007 Lasse Collin
|
||||
## Author: Lasse Collin
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
## modify it under the terms of the GNU Lesser General Public
|
||||
## License as published by the Free Software Foundation; either
|
||||
## version 2.1 of the License, or (at your option) any later version.
|
||||
##
|
||||
## This library is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## Lesser General Public License for more details.
|
||||
## This file has been put into the public domain.
|
||||
## You can do whatever you want with this file.
|
||||
##
|
||||
|
||||
SUBDIRS = liblzma lzma lzmadec scripts
|
||||
SUBDIRS = liblzma xzdec
|
||||
|
||||
if COND_XZ
|
||||
SUBDIRS += xz
|
||||
endif
|
||||
|
||||
if COND_LZMAINFO
|
||||
SUBDIRS += lzmainfo
|
||||
endif
|
||||
|
||||
if COND_SCRIPTS
|
||||
SUBDIRS += scripts
|
||||
endif
|
||||
|
||||
EXTRA_DIST = common
|
||||
|
||||
50
src/common/common_w32res.rc
Normal file
50
src/common/common_w32res.rc
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*/
|
||||
|
||||
#include <winresrc.h>
|
||||
#include "config.h"
|
||||
#define LZMA_H_INTERNAL
|
||||
#define LZMA_H_INTERNAL_RC
|
||||
#include "lzma/version.h"
|
||||
|
||||
#ifndef MY_BUILD
|
||||
# define MY_BUILD 0
|
||||
#endif
|
||||
#define MY_VERSION LZMA_VERSION_MAJOR,LZMA_VERSION_MINOR,LZMA_VERSION_PATCH,MY_BUILD
|
||||
|
||||
#define MY_FILENAME MY_NAME MY_SUFFIX
|
||||
#define MY_COMPANY "The Tukaani Project <http://tukaani.org/>"
|
||||
#define MY_PRODUCT PACKAGE_NAME " <" PACKAGE_URL ">"
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION MY_VERSION
|
||||
PRODUCTVERSION MY_VERSION
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE MY_TYPE
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", MY_COMPANY
|
||||
VALUE "FileDescription", MY_DESC
|
||||
VALUE "FileVersion", LZMA_VERSION_STRING
|
||||
VALUE "InternalName", MY_NAME
|
||||
VALUE "OriginalFilename", MY_FILENAME
|
||||
VALUE "ProductName", MY_PRODUCT
|
||||
VALUE "ProductVersion", LZMA_VERSION_STRING
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
42
src/common/mythread.h
Normal file
42
src/common/mythread.h
Normal file
@@ -0,0 +1,42 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file mythread.h
|
||||
/// \brief Wrappers for threads
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "sysdefs.h"
|
||||
|
||||
|
||||
#ifdef HAVE_PTHREAD
|
||||
# include <pthread.h>
|
||||
|
||||
# define mythread_once(func) \
|
||||
do { \
|
||||
static pthread_once_t once_ = PTHREAD_ONCE_INIT; \
|
||||
pthread_once(&once_, &func); \
|
||||
} while (0)
|
||||
|
||||
# define mythread_sigmask(how, set, oset) \
|
||||
pthread_sigmask(how, set, oset)
|
||||
|
||||
#else
|
||||
|
||||
# define mythread_once(func) \
|
||||
do { \
|
||||
static bool once_ = false; \
|
||||
if (!once_) { \
|
||||
func(); \
|
||||
once_ = true; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
# define mythread_sigmask(how, set, oset) \
|
||||
sigprocmask(how, set, oset)
|
||||
|
||||
#endif
|
||||
@@ -1,77 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file physmem.h
|
||||
/// \brief Get the amount of physical memory
|
||||
//
|
||||
// This code has been put into the public domain.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef PHYSMEM_H
|
||||
#define PHYSMEM_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_PHYSMEM_SYSCTL) || defined(HAVE_NCPU_SYSCTL)
|
||||
# ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
# endif
|
||||
# ifdef HAVE_SYS_SYSCTL_H
|
||||
# include <sys/sysctl.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/// \brief Get the amount of physical memory in bytes
|
||||
///
|
||||
/// \return Amount of physical memory in bytes. On error, zero is
|
||||
/// returned.
|
||||
static inline uint64_t
|
||||
physmem(void)
|
||||
{
|
||||
uint64_t ret = 0;
|
||||
|
||||
#if defined(HAVE_PHYSMEM_SYSCONF)
|
||||
const long pagesize = sysconf(_SC_PAGESIZE);
|
||||
const long pages = sysconf(_SC_PHYS_PAGES);
|
||||
if (pagesize != -1 || pages != -1)
|
||||
// According to docs, pagesize * pages can overflow.
|
||||
// Simple case is 32-bit box with 4 GiB or more RAM,
|
||||
// which may report exactly 4 GiB of RAM, and "long"
|
||||
// being 32-bit will overflow. Casting to uint64_t
|
||||
// hopefully avoids overflows in the near future.
|
||||
ret = (uint64_t)(pagesize) * (uint64_t)(pages);
|
||||
|
||||
#elif defined(HAVE_PHYSMEM_SYSCTL)
|
||||
int name[2] = { CTL_HW, HW_PHYSMEM };
|
||||
unsigned long mem;
|
||||
size_t mem_ptr_size = sizeof(mem);
|
||||
if (!sysctl(name, 2, &mem, &mem_ptr_size, NULL, NULL)) {
|
||||
// Some systems use unsigned int as the "return value".
|
||||
// This makes a difference on 64-bit boxes.
|
||||
if (mem_ptr_size != sizeof(mem)) {
|
||||
if (mem_ptr_size == sizeof(unsigned int))
|
||||
ret = *(unsigned int *)(&mem);
|
||||
} else {
|
||||
ret = mem;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -6,17 +6,10 @@
|
||||
/// This file is used also by the lzma command line tool, that's why this
|
||||
/// file is separate from common.h.
|
||||
//
|
||||
// Copyright (C) 2007 Lasse Collin
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,10 +24,118 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "lzma.h"
|
||||
// Get standard-compliant stdio functions under MinGW and MinGW-w64.
|
||||
#ifdef __MINGW32__
|
||||
# define __USE_MINGW_ANSI_STDIO 1
|
||||
#endif
|
||||
|
||||
// size_t and NULL
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
|
||||
// C99 says that inttypes.h always includes stdint.h, but some systems
|
||||
// don't do that, and require including stdint.h separately.
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
// Some pre-C99 systems have SIZE_MAX in limits.h instead of stdint.h. The
|
||||
// limits are also used to figure out some macros missing from pre-C99 systems.
|
||||
#ifdef HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
// Be more compatible with systems that have non-conforming inttypes.h.
|
||||
// We assume that int is 32-bit and that long is either 32-bit or 64-bit.
|
||||
// Full Autoconf test could be more correct, but this should work well enough.
|
||||
// Note that this duplicates some code from lzma.h, but this is better since
|
||||
// we can work without inttypes.h thanks to Autoconf tests.
|
||||
#ifndef UINT32_C
|
||||
# if UINT_MAX != 4294967295U
|
||||
# error UINT32_C is not defined and unsigned int is not 32-bit.
|
||||
# endif
|
||||
# define UINT32_C(n) n ## U
|
||||
#endif
|
||||
#ifndef UINT32_MAX
|
||||
# define UINT32_MAX UINT32_C(4294967295)
|
||||
#endif
|
||||
#ifndef PRIu32
|
||||
# define PRIu32 "u"
|
||||
#endif
|
||||
#ifndef PRIx32
|
||||
# define PRIx32 "x"
|
||||
#endif
|
||||
#ifndef PRIX32
|
||||
# define PRIX32 "X"
|
||||
#endif
|
||||
|
||||
#if ULONG_MAX == 4294967295UL
|
||||
# ifndef UINT64_C
|
||||
# define UINT64_C(n) n ## ULL
|
||||
# endif
|
||||
# ifndef PRIu64
|
||||
# define PRIu64 "llu"
|
||||
# endif
|
||||
# ifndef PRIx64
|
||||
# define PRIx64 "llx"
|
||||
# endif
|
||||
# ifndef PRIX64
|
||||
# define PRIX64 "llX"
|
||||
# endif
|
||||
#else
|
||||
# ifndef UINT64_C
|
||||
# define UINT64_C(n) n ## UL
|
||||
# endif
|
||||
# ifndef PRIu64
|
||||
# define PRIu64 "lu"
|
||||
# endif
|
||||
# ifndef PRIx64
|
||||
# define PRIx64 "lx"
|
||||
# endif
|
||||
# ifndef PRIX64
|
||||
# define PRIX64 "lX"
|
||||
# endif
|
||||
#endif
|
||||
#ifndef UINT64_MAX
|
||||
# define UINT64_MAX UINT64_C(18446744073709551615)
|
||||
#endif
|
||||
|
||||
// Interix has broken header files, which typedef size_t to unsigned long,
|
||||
// but a few lines later define SIZE_MAX to INT32_MAX.
|
||||
#ifdef __INTERIX
|
||||
# undef SIZE_MAX
|
||||
#endif
|
||||
|
||||
// The code currently assumes that size_t is either 32-bit or 64-bit.
|
||||
#ifndef SIZE_MAX
|
||||
# if SIZEOF_SIZE_T == 4
|
||||
# define SIZE_MAX UINT32_MAX
|
||||
# elif SIZEOF_SIZE_T == 8
|
||||
# define SIZE_MAX UINT64_MAX
|
||||
# else
|
||||
# error size_t is not 32-bit or 64-bit
|
||||
# endif
|
||||
#endif
|
||||
#if SIZE_MAX != UINT32_MAX && SIZE_MAX != UINT64_MAX
|
||||
# error size_t is not 32-bit or 64-bit
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
// Pre-C99 systems lack stdbool.h. All the code in LZMA Utils must be written
|
||||
// so that it works with fake bool type, for example:
|
||||
//
|
||||
// bool foo = (flags & 0x100) != 0;
|
||||
// bool bar = !!(flags & 0x100);
|
||||
//
|
||||
// This works with the real C99 bool but breaks with fake bool:
|
||||
//
|
||||
// bool baz = (flags & 0x100);
|
||||
//
|
||||
#ifdef HAVE_STDBOOL_H
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
@@ -47,17 +148,8 @@ typedef unsigned char _Bool;
|
||||
# define __bool_true_false_are_defined 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ASSERT_H
|
||||
# include <assert.h>
|
||||
#else
|
||||
# ifdef NDEBUG
|
||||
# define assert(x)
|
||||
# else
|
||||
// TODO: Pretty bad assert() macro.
|
||||
# define assert(x) (!(x) && abort())
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// string.h should be enough but let's include strings.h and memory.h too if
|
||||
// they exists, since that shouldn't do any harm, but may improve portability.
|
||||
#ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
@@ -75,26 +167,23 @@ typedef unsigned char _Bool;
|
||||
// Macros //
|
||||
////////////
|
||||
|
||||
#ifndef HAVE_MEMCPY
|
||||
# define memcpy(dest, src, n) bcopy(src, dest, n)
|
||||
#undef memzero
|
||||
#define memzero(s, n) memset(s, 0, n)
|
||||
|
||||
// NOTE: Avoid using MIN() and MAX(), because even conditionally defining
|
||||
// those macros can cause some portability trouble, since on some systems
|
||||
// the system headers insist defining their own versions.
|
||||
#define my_min(x, y) ((x) < (y) ? (x) : (y))
|
||||
#define my_max(x, y) ((x) > (y) ? (x) : (y))
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
# define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MEMMOVE
|
||||
# define memmove(dest, src, n) bcopy(src, dest, n)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MEMSET
|
||||
# define memzero(s, n) memset(s, 0, n)
|
||||
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4
|
||||
# define lzma_attr_alloc_size(x) __attribute__((__alloc_size__(x)))
|
||||
#else
|
||||
# define memzero(s, n) bzero(s, n)
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
# define MIN(x, y) ((x) < (y) ? (x) : (y))
|
||||
#endif
|
||||
|
||||
#ifndef MAX
|
||||
# define MAX(x, y) ((x) > (y) ? (x) : (y))
|
||||
# define lzma_attr_alloc_size(x)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
71
src/common/tuklib_common.h
Normal file
71
src/common/tuklib_common.h
Normal file
@@ -0,0 +1,71 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_common.h
|
||||
/// \brief Common definitions for tuklib modules
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_COMMON_H
|
||||
#define TUKLIB_COMMON_H
|
||||
|
||||
// The config file may be replaced by a package-specific file.
|
||||
// It should include at least stddef.h, inttypes.h, and limits.h.
|
||||
#include "tuklib_config.h"
|
||||
|
||||
// TUKLIB_SYMBOL_PREFIX is prefixed to all symbols exported by
|
||||
// the tuklib modules. If you use a tuklib module in a library,
|
||||
// you should use TUKLIB_SYMBOL_PREFIX to make sure that there
|
||||
// are no symbol conflicts in case someone links your library
|
||||
// into application that also uses the same tuklib module.
|
||||
#ifndef TUKLIB_SYMBOL_PREFIX
|
||||
# define TUKLIB_SYMBOL_PREFIX
|
||||
#endif
|
||||
|
||||
#define TUKLIB_CAT_X(a, b) a ## b
|
||||
#define TUKLIB_CAT(a, b) TUKLIB_CAT_X(a, b)
|
||||
|
||||
#ifndef TUKLIB_SYMBOL
|
||||
# define TUKLIB_SYMBOL(sym) TUKLIB_CAT(TUKLIB_SYMBOL_PREFIX, sym)
|
||||
#endif
|
||||
|
||||
#ifndef TUKLIB_DECLS_BEGIN
|
||||
# ifdef __cplusplus
|
||||
# define TUKLIB_DECLS_BEGIN extern "C" {
|
||||
# else
|
||||
# define TUKLIB_DECLS_BEGIN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef TUKLIB_DECLS_END
|
||||
# ifdef __cplusplus
|
||||
# define TUKLIB_DECLS_END }
|
||||
# else
|
||||
# define TUKLIB_DECLS_END
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(__GNUC_MINOR__)
|
||||
# define TUKLIB_GNUC_REQ(major, minor) \
|
||||
((__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)) \
|
||||
|| __GNUC__ > (major))
|
||||
#else
|
||||
# define TUKLIB_GNUC_REQ(major, minor) 0
|
||||
#endif
|
||||
|
||||
#if TUKLIB_GNUC_REQ(2, 5)
|
||||
# define tuklib_attr_noreturn __attribute__((__noreturn__))
|
||||
#else
|
||||
# define tuklib_attr_noreturn
|
||||
#endif
|
||||
|
||||
#if (defined(_WIN32) && !defined(__CYGWIN__)) \
|
||||
|| defined(__OS2__) || defined(__MSDOS__)
|
||||
# define TUKLIB_DOSLIKE 1
|
||||
#endif
|
||||
|
||||
#endif
|
||||
7
src/common/tuklib_config.h
Normal file
7
src/common/tuklib_config.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "sysdefs.h"
|
||||
#else
|
||||
# include <stddef.h>
|
||||
# include <inttypes.h>
|
||||
# include <limits.h>
|
||||
#endif
|
||||
62
src/common/tuklib_cpucores.c
Normal file
62
src/common/tuklib_cpucores.c
Normal file
@@ -0,0 +1,62 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_cpucores.c
|
||||
/// \brief Get the number of CPU cores online
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "tuklib_cpucores.h"
|
||||
|
||||
#if defined(TUKLIB_CPUCORES_SYSCTL)
|
||||
# ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
# endif
|
||||
# include <sys/sysctl.h>
|
||||
|
||||
#elif defined(TUKLIB_CPUCORES_SYSCONF)
|
||||
# include <unistd.h>
|
||||
|
||||
// HP-UX
|
||||
#elif defined(TUKLIB_CPUCORES_PSTAT_GETDYNAMIC)
|
||||
# include <sys/param.h>
|
||||
# include <sys/pstat.h>
|
||||
#endif
|
||||
|
||||
|
||||
extern uint32_t
|
||||
tuklib_cpucores(void)
|
||||
{
|
||||
uint32_t ret = 0;
|
||||
|
||||
#if defined(TUKLIB_CPUCORES_SYSCTL)
|
||||
int name[2] = { CTL_HW, HW_NCPU };
|
||||
int cpus;
|
||||
size_t cpus_size = sizeof(cpus);
|
||||
if (sysctl(name, 2, &cpus, &cpus_size, NULL, 0) != -1
|
||||
&& cpus_size == sizeof(cpus) && cpus > 0)
|
||||
ret = cpus;
|
||||
|
||||
#elif defined(TUKLIB_CPUCORES_SYSCONF)
|
||||
# ifdef _SC_NPROCESSORS_ONLN
|
||||
// Most systems
|
||||
const long cpus = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
# else
|
||||
// IRIX
|
||||
const long cpus = sysconf(_SC_NPROC_ONLN);
|
||||
# endif
|
||||
if (cpus > 0)
|
||||
ret = cpus;
|
||||
|
||||
#elif defined(TUKLIB_CPUCORES_PSTAT_GETDYNAMIC)
|
||||
struct pst_dynamic pst;
|
||||
if (pstat_getdynamic(&pst, sizeof(pst), 1, 0) != -1)
|
||||
ret = pst.psd_proc_cnt;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
23
src/common/tuklib_cpucores.h
Normal file
23
src/common/tuklib_cpucores.h
Normal file
@@ -0,0 +1,23 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_cpucores.h
|
||||
/// \brief Get the number of CPU cores online
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_CPUCORES_H
|
||||
#define TUKLIB_CPUCORES_H
|
||||
|
||||
#include "tuklib_common.h"
|
||||
TUKLIB_DECLS_BEGIN
|
||||
|
||||
#define tuklib_cpucores TUKLIB_SYMBOL(tuklib_cpucores)
|
||||
extern uint32_t tuklib_cpucores(void);
|
||||
|
||||
TUKLIB_DECLS_END
|
||||
#endif
|
||||
57
src/common/tuklib_exit.c
Normal file
57
src/common/tuklib_exit.c
Normal file
@@ -0,0 +1,57 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_exit.c
|
||||
/// \brief Close stdout and stderr, and exit
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "tuklib_common.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "tuklib_gettext.h"
|
||||
#include "tuklib_progname.h"
|
||||
#include "tuklib_exit.h"
|
||||
|
||||
|
||||
extern void
|
||||
tuklib_exit(int status, int err_status, int show_error)
|
||||
{
|
||||
if (status != err_status) {
|
||||
// Close stdout. If something goes wrong,
|
||||
// print an error message to stderr.
|
||||
const int ferror_err = ferror(stdout);
|
||||
const int fclose_err = fclose(stdout);
|
||||
if (ferror_err || fclose_err) {
|
||||
status = err_status;
|
||||
|
||||
// If it was fclose() that failed, we have the reason
|
||||
// in errno. If only ferror() indicated an error,
|
||||
// we have no idea what the reason was.
|
||||
if (show_error)
|
||||
fprintf(stderr, "%s: %s: %s\n", progname,
|
||||
_("Writing to standard "
|
||||
"output failed"),
|
||||
fclose_err ? strerror(errno)
|
||||
: _("Unknown error"));
|
||||
}
|
||||
}
|
||||
|
||||
if (status != err_status) {
|
||||
// Close stderr. If something goes wrong, there's
|
||||
// nothing where we could print an error message.
|
||||
// Just set the exit status.
|
||||
const int ferror_err = ferror(stderr);
|
||||
const int fclose_err = fclose(stderr);
|
||||
if (fclose_err || ferror_err)
|
||||
status = err_status;
|
||||
}
|
||||
|
||||
exit(status);
|
||||
}
|
||||
25
src/common/tuklib_exit.h
Normal file
25
src/common/tuklib_exit.h
Normal file
@@ -0,0 +1,25 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_exit.h
|
||||
/// \brief Close stdout and stderr, and exit
|
||||
/// \note Requires tuklib_progname and tuklib_gettext modules
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_EXIT_H
|
||||
#define TUKLIB_EXIT_H
|
||||
|
||||
#include "tuklib_common.h"
|
||||
TUKLIB_DECLS_BEGIN
|
||||
|
||||
#define tuklib_exit TUKLIB_SYMBOL(tuklib_exit)
|
||||
extern void tuklib_exit(int status, int err_status, int show_error)
|
||||
tuklib_attr_noreturn;
|
||||
|
||||
TUKLIB_DECLS_END
|
||||
#endif
|
||||
44
src/common/tuklib_gettext.h
Normal file
44
src/common/tuklib_gettext.h
Normal file
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_gettext.h
|
||||
/// \brief Wrapper for gettext and friends
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_GETTEXT_H
|
||||
#define TUKLIB_GETTEXT_H
|
||||
|
||||
#include "tuklib_common.h"
|
||||
#include <locale.h>
|
||||
|
||||
#ifndef TUKLIB_GETTEXT
|
||||
# ifdef ENABLE_NLS
|
||||
# define TUKLIB_GETTEXT 1
|
||||
# else
|
||||
# define TUKLIB_GETTEXT 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if TUKLIB_GETTEXT
|
||||
# include <libintl.h>
|
||||
# define tuklib_gettext_init(package, localedir) \
|
||||
do { \
|
||||
setlocale(LC_ALL, ""); \
|
||||
bindtextdomain(package, localedir); \
|
||||
textdomain(package); \
|
||||
} while (0)
|
||||
# define _(msgid) gettext(msgid)
|
||||
#else
|
||||
# define tuklib_gettext_init(package, localedir) \
|
||||
setlocale(LC_ALL, "")
|
||||
# define _(msgid) (msgid)
|
||||
# define ngettext(msgid1, msgid2, n) ((n) == 1 ? (msgid1) : (msgid2))
|
||||
#endif
|
||||
#define N_(msgid) msgid
|
||||
|
||||
#endif
|
||||
523
src/common/tuklib_integer.h
Normal file
523
src/common/tuklib_integer.h
Normal file
@@ -0,0 +1,523 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_integer.h
|
||||
/// \brief Various integer and bit operations
|
||||
///
|
||||
/// This file provides macros or functions to do some basic integer and bit
|
||||
/// operations.
|
||||
///
|
||||
/// Endianness related integer operations (XX = 16, 32, or 64; Y = b or l):
|
||||
/// - Byte swapping: bswapXX(num)
|
||||
/// - Byte order conversions to/from native: convXXYe(num)
|
||||
/// - Aligned reads: readXXYe(ptr)
|
||||
/// - Aligned writes: writeXXYe(ptr, num)
|
||||
/// - Unaligned reads (16/32-bit only): unaligned_readXXYe(ptr)
|
||||
/// - Unaligned writes (16/32-bit only): unaligned_writeXXYe(ptr, num)
|
||||
///
|
||||
/// Since they can macros, the arguments should have no side effects since
|
||||
/// they may be evaluated more than once.
|
||||
///
|
||||
/// \todo PowerPC and possibly some other architectures support
|
||||
/// byte swapping load and store instructions. This file
|
||||
/// doesn't take advantage of those instructions.
|
||||
///
|
||||
/// Bit scan operations for non-zero 32-bit integers:
|
||||
/// - Bit scan reverse (find highest non-zero bit): bsr32(num)
|
||||
/// - Count leading zeros: clz32(num)
|
||||
/// - Count trailing zeros: ctz32(num)
|
||||
/// - Bit scan forward (simply an alias for ctz32()): bsf32(num)
|
||||
///
|
||||
/// The above bit scan operations return 0-31. If num is zero,
|
||||
/// the result is undefined.
|
||||
//
|
||||
// Authors: Lasse Collin
|
||||
// Joachim Henke
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_INTEGER_H
|
||||
#define TUKLIB_INTEGER_H
|
||||
|
||||
#include "tuklib_common.h"
|
||||
|
||||
|
||||
////////////////////////////////////////
|
||||
// Operating system specific features //
|
||||
////////////////////////////////////////
|
||||
|
||||
#if defined(HAVE_BYTESWAP_H)
|
||||
// glibc, uClibc, dietlibc
|
||||
# include <byteswap.h>
|
||||
# ifdef HAVE_BSWAP_16
|
||||
# define bswap16(num) bswap_16(num)
|
||||
# endif
|
||||
# ifdef HAVE_BSWAP_32
|
||||
# define bswap32(num) bswap_32(num)
|
||||
# endif
|
||||
# ifdef HAVE_BSWAP_64
|
||||
# define bswap64(num) bswap_64(num)
|
||||
# endif
|
||||
|
||||
#elif defined(HAVE_SYS_ENDIAN_H)
|
||||
// *BSDs and Darwin
|
||||
# include <sys/endian.h>
|
||||
|
||||
#elif defined(HAVE_SYS_BYTEORDER_H)
|
||||
// Solaris
|
||||
# include <sys/byteorder.h>
|
||||
# ifdef BSWAP_16
|
||||
# define bswap16(num) BSWAP_16(num)
|
||||
# endif
|
||||
# ifdef BSWAP_32
|
||||
# define bswap32(num) BSWAP_32(num)
|
||||
# endif
|
||||
# ifdef BSWAP_64
|
||||
# define bswap64(num) BSWAP_64(num)
|
||||
# endif
|
||||
# ifdef BE_16
|
||||
# define conv16be(num) BE_16(num)
|
||||
# endif
|
||||
# ifdef BE_32
|
||||
# define conv32be(num) BE_32(num)
|
||||
# endif
|
||||
# ifdef BE_64
|
||||
# define conv64be(num) BE_64(num)
|
||||
# endif
|
||||
# ifdef LE_16
|
||||
# define conv16le(num) LE_16(num)
|
||||
# endif
|
||||
# ifdef LE_32
|
||||
# define conv32le(num) LE_32(num)
|
||||
# endif
|
||||
# ifdef LE_64
|
||||
# define conv64le(num) LE_64(num)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
///////////////////
|
||||
// Byte swapping //
|
||||
///////////////////
|
||||
|
||||
#ifndef bswap16
|
||||
# define bswap16(num) \
|
||||
(((uint16_t)(num) << 8) | ((uint16_t)(num) >> 8))
|
||||
#endif
|
||||
|
||||
#ifndef bswap32
|
||||
# define bswap32(num) \
|
||||
( (((uint32_t)(num) << 24) ) \
|
||||
| (((uint32_t)(num) << 8) & UINT32_C(0x00FF0000)) \
|
||||
| (((uint32_t)(num) >> 8) & UINT32_C(0x0000FF00)) \
|
||||
| (((uint32_t)(num) >> 24) ) )
|
||||
#endif
|
||||
|
||||
#ifndef bswap64
|
||||
# define bswap64(num) \
|
||||
( (((uint64_t)(num) << 56) ) \
|
||||
| (((uint64_t)(num) << 40) & UINT64_C(0x00FF000000000000)) \
|
||||
| (((uint64_t)(num) << 24) & UINT64_C(0x0000FF0000000000)) \
|
||||
| (((uint64_t)(num) << 8) & UINT64_C(0x000000FF00000000)) \
|
||||
| (((uint64_t)(num) >> 8) & UINT64_C(0x00000000FF000000)) \
|
||||
| (((uint64_t)(num) >> 24) & UINT64_C(0x0000000000FF0000)) \
|
||||
| (((uint64_t)(num) >> 40) & UINT64_C(0x000000000000FF00)) \
|
||||
| (((uint64_t)(num) >> 56) ) )
|
||||
#endif
|
||||
|
||||
// Define conversion macros using the basic byte swapping macros.
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# ifndef conv16be
|
||||
# define conv16be(num) ((uint16_t)(num))
|
||||
# endif
|
||||
# ifndef conv32be
|
||||
# define conv32be(num) ((uint32_t)(num))
|
||||
# endif
|
||||
# ifndef conv64be
|
||||
# define conv64be(num) ((uint64_t)(num))
|
||||
# endif
|
||||
# ifndef conv16le
|
||||
# define conv16le(num) bswap16(num)
|
||||
# endif
|
||||
# ifndef conv32le
|
||||
# define conv32le(num) bswap32(num)
|
||||
# endif
|
||||
# ifndef conv64le
|
||||
# define conv64le(num) bswap64(num)
|
||||
# endif
|
||||
#else
|
||||
# ifndef conv16be
|
||||
# define conv16be(num) bswap16(num)
|
||||
# endif
|
||||
# ifndef conv32be
|
||||
# define conv32be(num) bswap32(num)
|
||||
# endif
|
||||
# ifndef conv64be
|
||||
# define conv64be(num) bswap64(num)
|
||||
# endif
|
||||
# ifndef conv16le
|
||||
# define conv16le(num) ((uint16_t)(num))
|
||||
# endif
|
||||
# ifndef conv32le
|
||||
# define conv32le(num) ((uint32_t)(num))
|
||||
# endif
|
||||
# ifndef conv64le
|
||||
# define conv64le(num) ((uint64_t)(num))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
//////////////////////////////
|
||||
// Aligned reads and writes //
|
||||
//////////////////////////////
|
||||
|
||||
static inline uint16_t
|
||||
read16be(const uint8_t *buf)
|
||||
{
|
||||
uint16_t num = *(const uint16_t *)buf;
|
||||
return conv16be(num);
|
||||
}
|
||||
|
||||
|
||||
static inline uint16_t
|
||||
read16le(const uint8_t *buf)
|
||||
{
|
||||
uint16_t num = *(const uint16_t *)buf;
|
||||
return conv16le(num);
|
||||
}
|
||||
|
||||
|
||||
static inline uint32_t
|
||||
read32be(const uint8_t *buf)
|
||||
{
|
||||
uint32_t num = *(const uint32_t *)buf;
|
||||
return conv32be(num);
|
||||
}
|
||||
|
||||
|
||||
static inline uint32_t
|
||||
read32le(const uint8_t *buf)
|
||||
{
|
||||
uint32_t num = *(const uint32_t *)buf;
|
||||
return conv32le(num);
|
||||
}
|
||||
|
||||
|
||||
static inline uint64_t
|
||||
read64be(const uint8_t *buf)
|
||||
{
|
||||
uint64_t num = *(const uint64_t *)buf;
|
||||
return conv64be(num);
|
||||
}
|
||||
|
||||
|
||||
static inline uint64_t
|
||||
read64le(const uint8_t *buf)
|
||||
{
|
||||
uint64_t num = *(const uint64_t *)buf;
|
||||
return conv64le(num);
|
||||
}
|
||||
|
||||
|
||||
// NOTE: Possible byte swapping must be done in a macro to allow GCC
|
||||
// to optimize byte swapping of constants when using glibc's or *BSD's
|
||||
// byte swapping macros. The actual write is done in an inline function
|
||||
// to make type checking of the buf pointer possible similarly to readXXYe()
|
||||
// functions.
|
||||
|
||||
#define write16be(buf, num) write16ne((buf), conv16be(num))
|
||||
#define write16le(buf, num) write16ne((buf), conv16le(num))
|
||||
#define write32be(buf, num) write32ne((buf), conv32be(num))
|
||||
#define write32le(buf, num) write32ne((buf), conv32le(num))
|
||||
#define write64be(buf, num) write64ne((buf), conv64be(num))
|
||||
#define write64le(buf, num) write64ne((buf), conv64le(num))
|
||||
|
||||
|
||||
static inline void
|
||||
write16ne(uint8_t *buf, uint16_t num)
|
||||
{
|
||||
*(uint16_t *)buf = num;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
write32ne(uint8_t *buf, uint32_t num)
|
||||
{
|
||||
*(uint32_t *)buf = num;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
write64ne(uint8_t *buf, uint64_t num)
|
||||
{
|
||||
*(uint64_t *)buf = num;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////
|
||||
// Unaligned reads and writes //
|
||||
////////////////////////////////
|
||||
|
||||
// NOTE: TUKLIB_FAST_UNALIGNED_ACCESS indicates only support for 16-bit and
|
||||
// 32-bit unaligned integer loads and stores. It's possible that 64-bit
|
||||
// unaligned access doesn't work or is slower than byte-by-byte access.
|
||||
// Since unaligned 64-bit is probably not needed as often as 16-bit or
|
||||
// 32-bit, we simply don't support 64-bit unaligned access for now.
|
||||
#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
|
||||
# define unaligned_read16be read16be
|
||||
# define unaligned_read16le read16le
|
||||
# define unaligned_read32be read32be
|
||||
# define unaligned_read32le read32le
|
||||
# define unaligned_write16be write16be
|
||||
# define unaligned_write16le write16le
|
||||
# define unaligned_write32be write32be
|
||||
# define unaligned_write32le write32le
|
||||
|
||||
#else
|
||||
|
||||
static inline uint16_t
|
||||
unaligned_read16be(const uint8_t *buf)
|
||||
{
|
||||
uint16_t num = ((uint16_t)buf[0] << 8) | (uint16_t)buf[1];
|
||||
return num;
|
||||
}
|
||||
|
||||
|
||||
static inline uint16_t
|
||||
unaligned_read16le(const uint8_t *buf)
|
||||
{
|
||||
uint16_t num = ((uint16_t)buf[0]) | ((uint16_t)buf[1] << 8);
|
||||
return num;
|
||||
}
|
||||
|
||||
|
||||
static inline uint32_t
|
||||
unaligned_read32be(const uint8_t *buf)
|
||||
{
|
||||
uint32_t num = (uint32_t)buf[0] << 24;
|
||||
num |= (uint32_t)buf[1] << 16;
|
||||
num |= (uint32_t)buf[2] << 8;
|
||||
num |= (uint32_t)buf[3];
|
||||
return num;
|
||||
}
|
||||
|
||||
|
||||
static inline uint32_t
|
||||
unaligned_read32le(const uint8_t *buf)
|
||||
{
|
||||
uint32_t num = (uint32_t)buf[0];
|
||||
num |= (uint32_t)buf[1] << 8;
|
||||
num |= (uint32_t)buf[2] << 16;
|
||||
num |= (uint32_t)buf[3] << 24;
|
||||
return num;
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
unaligned_write16be(uint8_t *buf, uint16_t num)
|
||||
{
|
||||
buf[0] = num >> 8;
|
||||
buf[1] = num;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
unaligned_write16le(uint8_t *buf, uint16_t num)
|
||||
{
|
||||
buf[0] = num;
|
||||
buf[1] = num >> 8;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
unaligned_write32be(uint8_t *buf, uint32_t num)
|
||||
{
|
||||
buf[0] = num >> 24;
|
||||
buf[1] = num >> 16;
|
||||
buf[2] = num >> 8;
|
||||
buf[3] = num;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
unaligned_write32le(uint8_t *buf, uint32_t num)
|
||||
{
|
||||
buf[0] = num;
|
||||
buf[1] = num >> 8;
|
||||
buf[2] = num >> 16;
|
||||
buf[3] = num >> 24;
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
static inline uint32_t
|
||||
bsr32(uint32_t n)
|
||||
{
|
||||
// Check for ICC first, since it tends to define __GNUC__ too.
|
||||
#if defined(__INTEL_COMPILER)
|
||||
return _bit_scan_reverse(n);
|
||||
|
||||
#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX == UINT32_MAX
|
||||
// GCC >= 3.4 has __builtin_clz(), which gives good results on
|
||||
// multiple architectures. On x86, __builtin_clz() ^ 31U becomes
|
||||
// either plain BSR (so the XOR gets optimized away) or LZCNT and
|
||||
// XOR (if -march indicates that SSE4a instructions are supported).
|
||||
return __builtin_clz(n) ^ 31U;
|
||||
|
||||
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
uint32_t i;
|
||||
__asm__("bsrl %1, %0" : "=r" (i) : "rm" (n));
|
||||
return i;
|
||||
|
||||
#elif defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
// MSVC isn't supported by tuklib, but since this code exists,
|
||||
// it doesn't hurt to have it here anyway.
|
||||
uint32_t i;
|
||||
_BitScanReverse((DWORD *)&i, n);
|
||||
return i;
|
||||
|
||||
#else
|
||||
uint32_t i = 31;
|
||||
|
||||
if ((n & UINT32_C(0xFFFF0000)) == 0) {
|
||||
n <<= 16;
|
||||
i = 15;
|
||||
}
|
||||
|
||||
if ((n & UINT32_C(0xFF000000)) == 0) {
|
||||
n <<= 8;
|
||||
i -= 8;
|
||||
}
|
||||
|
||||
if ((n & UINT32_C(0xF0000000)) == 0) {
|
||||
n <<= 4;
|
||||
i -= 4;
|
||||
}
|
||||
|
||||
if ((n & UINT32_C(0xC0000000)) == 0) {
|
||||
n <<= 2;
|
||||
i -= 2;
|
||||
}
|
||||
|
||||
if ((n & UINT32_C(0x80000000)) == 0)
|
||||
--i;
|
||||
|
||||
return i;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static inline uint32_t
|
||||
clz32(uint32_t n)
|
||||
{
|
||||
#if defined(__INTEL_COMPILER)
|
||||
return _bit_scan_reverse(n) ^ 31U;
|
||||
|
||||
#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX == UINT32_MAX
|
||||
return __builtin_clz(n);
|
||||
|
||||
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
uint32_t i;
|
||||
__asm__("bsrl %1, %0\n\t"
|
||||
"xorl $31, %0"
|
||||
: "=r" (i) : "rm" (n));
|
||||
return i;
|
||||
|
||||
#elif defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
uint32_t i;
|
||||
_BitScanReverse((DWORD *)&i, n);
|
||||
return i ^ 31U;
|
||||
|
||||
#else
|
||||
uint32_t i = 0;
|
||||
|
||||
if ((n & UINT32_C(0xFFFF0000)) == 0) {
|
||||
n <<= 16;
|
||||
i = 16;
|
||||
}
|
||||
|
||||
if ((n & UINT32_C(0xFF000000)) == 0) {
|
||||
n <<= 8;
|
||||
i += 8;
|
||||
}
|
||||
|
||||
if ((n & UINT32_C(0xF0000000)) == 0) {
|
||||
n <<= 4;
|
||||
i += 4;
|
||||
}
|
||||
|
||||
if ((n & UINT32_C(0xC0000000)) == 0) {
|
||||
n <<= 2;
|
||||
i += 2;
|
||||
}
|
||||
|
||||
if ((n & UINT32_C(0x80000000)) == 0)
|
||||
++i;
|
||||
|
||||
return i;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static inline uint32_t
|
||||
ctz32(uint32_t n)
|
||||
{
|
||||
#if defined(__INTEL_COMPILER)
|
||||
return _bit_scan_forward(n);
|
||||
|
||||
#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX >= UINT32_MAX
|
||||
return __builtin_ctz(n);
|
||||
|
||||
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
uint32_t i;
|
||||
__asm__("bsfl %1, %0" : "=r" (i) : "rm" (n));
|
||||
return i;
|
||||
|
||||
#elif defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
uint32_t i;
|
||||
_BitScanForward((DWORD *)&i, n);
|
||||
return i;
|
||||
|
||||
#else
|
||||
uint32_t i = 0;
|
||||
|
||||
if ((n & UINT32_C(0x0000FFFF)) == 0) {
|
||||
n >>= 16;
|
||||
i = 16;
|
||||
}
|
||||
|
||||
if ((n & UINT32_C(0x000000FF)) == 0) {
|
||||
n >>= 8;
|
||||
i += 8;
|
||||
}
|
||||
|
||||
if ((n & UINT32_C(0x0000000F)) == 0) {
|
||||
n >>= 4;
|
||||
i += 4;
|
||||
}
|
||||
|
||||
if ((n & UINT32_C(0x00000003)) == 0) {
|
||||
n >>= 2;
|
||||
i += 2;
|
||||
}
|
||||
|
||||
if ((n & UINT32_C(0x00000001)) == 0)
|
||||
++i;
|
||||
|
||||
return i;
|
||||
#endif
|
||||
}
|
||||
|
||||
#define bsf32 ctz32
|
||||
|
||||
#endif
|
||||
66
src/common/tuklib_mbstr.h
Normal file
66
src/common/tuklib_mbstr.h
Normal file
@@ -0,0 +1,66 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_mstr.h
|
||||
/// \brief Utility functions for handling multibyte strings
|
||||
///
|
||||
/// If not enough multibyte string support is available in the C library,
|
||||
/// these functions keep working with the assumption that all strings
|
||||
/// are in a single-byte character set without combining characters, e.g.
|
||||
/// US-ASCII or ISO-8859-*.
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_MBSTR_H
|
||||
#define TUKLIB_MBSTR_H
|
||||
|
||||
#include "tuklib_common.h"
|
||||
TUKLIB_DECLS_BEGIN
|
||||
|
||||
#define tuklib_mbstr_width TUKLIB_SYMBOL(tuklib_mbstr_width)
|
||||
extern size_t tuklib_mbstr_width(const char *str, size_t *bytes);
|
||||
///<
|
||||
/// \brief Get the number of columns needed for the multibyte string
|
||||
///
|
||||
/// This is somewhat similar to wcswidth() but works on multibyte strings.
|
||||
///
|
||||
/// \param str String whose width is to be calculated. If the
|
||||
/// current locale uses a multibyte character set
|
||||
/// that has shift states, the string must begin
|
||||
/// and end in the initial shift state.
|
||||
/// \param bytes If this is not NULL, *bytes is set to the
|
||||
/// value returned by strlen(str) (even if an
|
||||
/// error occurs when calculating the width).
|
||||
///
|
||||
/// \return On success, the number of columns needed to display the
|
||||
/// string e.g. in a terminal emulator is returned. On error,
|
||||
/// (size_t)-1 is returned. Possible errors include invalid,
|
||||
/// partial, or non-printable multibyte character in str, or
|
||||
/// that str doesn't end in the initial shift state.
|
||||
|
||||
#define tuklib_mbstr_fw TUKLIB_SYMBOL(tuklib_mbstr_fw)
|
||||
extern int tuklib_mbstr_fw(const char *str, int columns_min);
|
||||
///<
|
||||
/// \brief Get the field width for printf() e.g. to align table columns
|
||||
///
|
||||
/// Printing simple tables to a terminal can be done using the field field
|
||||
/// feature in the printf() format string, but it works only with single-byte
|
||||
/// character sets. To do the same with multibyte strings, tuklib_mbstr_fw()
|
||||
/// can be used to calculate appropriate field width.
|
||||
///
|
||||
/// The behavior of this function is undefined, if
|
||||
/// - str is NULL or not terminated with '\0';
|
||||
/// - columns_min <= 0; or
|
||||
/// - the calculated field width exceeds INT_MAX.
|
||||
///
|
||||
/// \return If tuklib_mbstr_width(str, NULL) fails, -1 is returned.
|
||||
/// If str needs more columns than columns_min, zero is returned.
|
||||
/// Otherwise a positive integer is returned, which can be
|
||||
/// used as the field width, e.g. printf("%*s", fw, str).
|
||||
|
||||
TUKLIB_DECLS_END
|
||||
#endif
|
||||
31
src/common/tuklib_mbstr_fw.c
Normal file
31
src/common/tuklib_mbstr_fw.c
Normal file
@@ -0,0 +1,31 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_mstr_fw.c
|
||||
/// \brief Get the field width for printf() e.g. to align table columns
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "tuklib_mbstr.h"
|
||||
|
||||
|
||||
extern int
|
||||
tuklib_mbstr_fw(const char *str, int columns_min)
|
||||
{
|
||||
size_t len;
|
||||
const size_t width = tuklib_mbstr_width(str, &len);
|
||||
if (width == (size_t)-1)
|
||||
return -1;
|
||||
|
||||
if (width > (size_t)columns_min)
|
||||
return 0;
|
||||
|
||||
if (width < (size_t)columns_min)
|
||||
len += (size_t)columns_min - width;
|
||||
|
||||
return len;
|
||||
}
|
||||
64
src/common/tuklib_mbstr_width.c
Normal file
64
src/common/tuklib_mbstr_width.c
Normal file
@@ -0,0 +1,64 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_mstr_width.c
|
||||
/// \brief Calculate width of a multibyte string
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "tuklib_mbstr.h"
|
||||
|
||||
#if defined(HAVE_MBRTOWC) && defined(HAVE_WCWIDTH)
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
|
||||
extern size_t
|
||||
tuklib_mbstr_width(const char *str, size_t *bytes)
|
||||
{
|
||||
const size_t len = strlen(str);
|
||||
if (bytes != NULL)
|
||||
*bytes = len;
|
||||
|
||||
#if !(defined(HAVE_MBRTOWC) && defined(HAVE_WCWIDTH))
|
||||
// In single-byte mode, the width of the string is the same
|
||||
// as its length.
|
||||
return len;
|
||||
|
||||
#else
|
||||
mbstate_t state;
|
||||
memset(&state, 0, sizeof(state));
|
||||
|
||||
size_t width = 0;
|
||||
size_t i = 0;
|
||||
|
||||
// Convert one multibyte character at a time to wchar_t
|
||||
// and get its width using wcwidth().
|
||||
while (i < len) {
|
||||
wchar_t wc;
|
||||
const size_t ret = mbrtowc(&wc, str + i, len - i, &state);
|
||||
if (ret < 1 || ret > len)
|
||||
return (size_t)-1;
|
||||
|
||||
i += ret;
|
||||
|
||||
const int wc_width = wcwidth(wc);
|
||||
if (wc_width < 0)
|
||||
return (size_t)-1;
|
||||
|
||||
width += wc_width;
|
||||
}
|
||||
|
||||
// Require that the string ends in the initial shift state.
|
||||
// This way the caller can be combine the string with other
|
||||
// strings without needing to worry about the shift states.
|
||||
if (!mbsinit(&state))
|
||||
return (size_t)-1;
|
||||
|
||||
return width;
|
||||
#endif
|
||||
}
|
||||
@@ -1,27 +1,33 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file open_stdxxx.h
|
||||
/// \file tuklib_open_stdxxx.c
|
||||
/// \brief Make sure that file descriptors 0, 1, and 2 are open
|
||||
//
|
||||
// This code has been put into the public domain.
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef OPEN_STDXXX_H
|
||||
#define OPEN_STDXXX_H
|
||||
#include "tuklib_open_stdxxx.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#ifndef TUKLIB_DOSLIKE
|
||||
# include <stdlib.h>
|
||||
# include <errno.h>
|
||||
# include <fcntl.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
open_stdxxx(int status)
|
||||
extern void
|
||||
tuklib_open_stdxxx(int err_status)
|
||||
{
|
||||
#ifdef TUKLIB_DOSLIKE
|
||||
// Do nothing, just silence warnings.
|
||||
(void)err_status;
|
||||
|
||||
#else
|
||||
for (int i = 0; i <= 2; ++i) {
|
||||
// We use fcntl() to check if the file descriptor is open.
|
||||
if (fcntl(i, F_GETFD) == -1 && errno == EBADF) {
|
||||
@@ -39,12 +45,11 @@ open_stdxxx(int status)
|
||||
// may very well be non-existent. This
|
||||
// error should be extremely rare.
|
||||
(void)close(fd);
|
||||
exit(status);
|
||||
exit(err_status);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
23
src/common/tuklib_open_stdxxx.h
Normal file
23
src/common/tuklib_open_stdxxx.h
Normal file
@@ -0,0 +1,23 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_open_stdxxx.h
|
||||
/// \brief Make sure that file descriptors 0, 1, and 2 are open
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_OPEN_STDXXX_H
|
||||
#define TUKLIB_OPEN_STDXXX_H
|
||||
|
||||
#include "tuklib_common.h"
|
||||
TUKLIB_DECLS_BEGIN
|
||||
|
||||
#define tuklib_open_stdxx TUKLIB_SYMBOL(tuklib_open_stdxxx)
|
||||
extern void tuklib_open_stdxxx(int err_status);
|
||||
|
||||
TUKLIB_DECLS_END
|
||||
#endif
|
||||
196
src/common/tuklib_physmem.c
Normal file
196
src/common/tuklib_physmem.c
Normal file
@@ -0,0 +1,196 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_physmem.c
|
||||
/// \brief Get the amount of physical memory
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "tuklib_physmem.h"
|
||||
|
||||
// We want to use Windows-specific code on Cygwin, which also has memory
|
||||
// information available via sysconf(), but on Cygwin 1.5 and older it
|
||||
// gives wrong results (from our point of view).
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
# ifndef _WIN32_WINNT
|
||||
# define _WIN32_WINNT 0x0500
|
||||
# endif
|
||||
# include <windows.h>
|
||||
|
||||
#elif defined(__OS2__)
|
||||
# define INCL_DOSMISC
|
||||
# include <os2.h>
|
||||
|
||||
#elif defined(__DJGPP__)
|
||||
# include <dpmi.h>
|
||||
|
||||
#elif defined(__VMS)
|
||||
# include <lib$routines.h>
|
||||
# include <syidef.h>
|
||||
# include <ssdef.h>
|
||||
|
||||
// AIX
|
||||
#elif defined(TUKLIB_PHYSMEM_AIX)
|
||||
# include <sys/systemcfg.h>
|
||||
|
||||
#elif defined(TUKLIB_PHYSMEM_SYSCONF)
|
||||
# include <unistd.h>
|
||||
|
||||
#elif defined(TUKLIB_PHYSMEM_SYSCTL)
|
||||
# ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
# endif
|
||||
# include <sys/sysctl.h>
|
||||
|
||||
// Tru64
|
||||
#elif defined(TUKLIB_PHYSMEM_GETSYSINFO)
|
||||
# include <sys/sysinfo.h>
|
||||
# include <machine/hal_sysinfo.h>
|
||||
|
||||
// HP-UX
|
||||
#elif defined(TUKLIB_PHYSMEM_PSTAT_GETSTATIC)
|
||||
# include <sys/param.h>
|
||||
# include <sys/pstat.h>
|
||||
|
||||
// IRIX
|
||||
#elif defined(TUKLIB_PHYSMEM_GETINVENT_R)
|
||||
# include <invent.h>
|
||||
|
||||
// This sysinfo() is Linux-specific.
|
||||
#elif defined(TUKLIB_PHYSMEM_SYSINFO)
|
||||
# include <sys/sysinfo.h>
|
||||
#endif
|
||||
|
||||
|
||||
extern uint64_t
|
||||
tuklib_physmem(void)
|
||||
{
|
||||
uint64_t ret = 0;
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
if ((GetVersion() & 0xFF) >= 5) {
|
||||
// Windows 2000 and later have GlobalMemoryStatusEx() which
|
||||
// supports reporting values greater than 4 GiB. To keep the
|
||||
// code working also on older Windows versions, use
|
||||
// GlobalMemoryStatusEx() conditionally.
|
||||
HMODULE kernel32 = GetModuleHandle("kernel32.dll");
|
||||
if (kernel32 != NULL) {
|
||||
BOOL (WINAPI *gmse)(LPMEMORYSTATUSEX) = GetProcAddress(
|
||||
kernel32, "GlobalMemoryStatusEx");
|
||||
if (gmse != NULL) {
|
||||
MEMORYSTATUSEX meminfo;
|
||||
meminfo.dwLength = sizeof(meminfo);
|
||||
if (gmse(&meminfo))
|
||||
ret = meminfo.ullTotalPhys;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
// GlobalMemoryStatus() is supported by Windows 95 and later,
|
||||
// so it is fine to link against it unconditionally. Note that
|
||||
// GlobalMemoryStatus() has no return value.
|
||||
MEMORYSTATUS meminfo;
|
||||
meminfo.dwLength = sizeof(meminfo);
|
||||
GlobalMemoryStatus(&meminfo);
|
||||
ret = meminfo.dwTotalPhys;
|
||||
}
|
||||
|
||||
#elif defined(__OS2__)
|
||||
unsigned long mem;
|
||||
if (DosQuerySysInfo(QSV_TOTPHYSMEM, QSV_TOTPHYSMEM,
|
||||
&mem, sizeof(mem)) == 0)
|
||||
ret = mem;
|
||||
|
||||
#elif defined(__DJGPP__)
|
||||
__dpmi_free_mem_info meminfo;
|
||||
if (__dpmi_get_free_memory_information(&meminfo) == 0
|
||||
&& meminfo.total_number_of_physical_pages
|
||||
!= (unsigned long)-1)
|
||||
ret = (uint64_t)meminfo.total_number_of_physical_pages * 4096;
|
||||
|
||||
#elif defined(__VMS)
|
||||
int vms_mem;
|
||||
int val = SYI$_MEMSIZE;
|
||||
if (LIB$GETSYI(&val, &vms_mem, 0, 0, 0, 0) == SS$_NORMAL)
|
||||
ret = (uint64_t)vms_mem * 8192;
|
||||
|
||||
#elif defined(TUKLIB_PHYSMEM_AIX)
|
||||
ret = _system_configuration.physmem;
|
||||
|
||||
#elif defined(TUKLIB_PHYSMEM_SYSCONF)
|
||||
const long pagesize = sysconf(_SC_PAGESIZE);
|
||||
const long pages = sysconf(_SC_PHYS_PAGES);
|
||||
if (pagesize != -1 && pages != -1)
|
||||
// According to docs, pagesize * pages can overflow.
|
||||
// Simple case is 32-bit box with 4 GiB or more RAM,
|
||||
// which may report exactly 4 GiB of RAM, and "long"
|
||||
// being 32-bit will overflow. Casting to uint64_t
|
||||
// hopefully avoids overflows in the near future.
|
||||
ret = (uint64_t)pagesize * (uint64_t)pages;
|
||||
|
||||
#elif defined(TUKLIB_PHYSMEM_SYSCTL)
|
||||
int name[2] = {
|
||||
CTL_HW,
|
||||
#ifdef HW_PHYSMEM64
|
||||
HW_PHYSMEM64
|
||||
#else
|
||||
HW_PHYSMEM
|
||||
#endif
|
||||
};
|
||||
union {
|
||||
uint32_t u32;
|
||||
uint64_t u64;
|
||||
} mem;
|
||||
size_t mem_ptr_size = sizeof(mem.u64);
|
||||
if (sysctl(name, 2, &mem.u64, &mem_ptr_size, NULL, 0) != -1) {
|
||||
// IIRC, 64-bit "return value" is possible on some 64-bit
|
||||
// BSD systems even with HW_PHYSMEM (instead of HW_PHYSMEM64),
|
||||
// so support both.
|
||||
if (mem_ptr_size == sizeof(mem.u64))
|
||||
ret = mem.u64;
|
||||
else if (mem_ptr_size == sizeof(mem.u32))
|
||||
ret = mem.u32;
|
||||
}
|
||||
|
||||
#elif defined(TUKLIB_PHYSMEM_GETSYSINFO)
|
||||
// Docs are unclear if "start" is needed, but it doesn't hurt
|
||||
// much to have it.
|
||||
int memkb;
|
||||
int start = 0;
|
||||
if (getsysinfo(GSI_PHYSMEM, (caddr_t)&memkb, sizeof(memkb), &start)
|
||||
!= -1)
|
||||
ret = (uint64_t)memkb * 1024;
|
||||
|
||||
#elif defined(TUKLIB_PHYSMEM_PSTAT_GETSTATIC)
|
||||
struct pst_static pst;
|
||||
if (pstat_getstatic(&pst, sizeof(pst), 1, 0) != -1)
|
||||
ret = (uint64_t)pst.physical_memory * (uint64_t)pst.page_size;
|
||||
|
||||
#elif defined(TUKLIB_PHYSMEM_GETINVENT_R)
|
||||
inv_state_t *st = NULL;
|
||||
if (setinvent_r(&st) != -1) {
|
||||
inventory_t *i;
|
||||
while ((i = getinvent_r(st)) != NULL) {
|
||||
if (i->inv_class == INV_MEMORY
|
||||
&& i->inv_type == INV_MAIN_MB) {
|
||||
ret = (uint64_t)i->inv_state << 20;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
endinvent_r(st);
|
||||
}
|
||||
|
||||
#elif defined(TUKLIB_PHYSMEM_SYSINFO)
|
||||
struct sysinfo si;
|
||||
if (sysinfo(&si) == 0)
|
||||
ret = (uint64_t)si.totalram * si.mem_unit;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
28
src/common/tuklib_physmem.h
Normal file
28
src/common/tuklib_physmem.h
Normal file
@@ -0,0 +1,28 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_physmem.h
|
||||
/// \brief Get the amount of physical memory
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_PHYSMEM_H
|
||||
#define TUKLIB_PHYSMEM_H
|
||||
|
||||
#include "tuklib_common.h"
|
||||
TUKLIB_DECLS_BEGIN
|
||||
|
||||
#define tuklib_physmem TUKLIB_SYMBOL(tuklib_physmem)
|
||||
extern uint64_t tuklib_physmem(void);
|
||||
///<
|
||||
/// \brief Get the amount of physical memory in bytes
|
||||
///
|
||||
/// \return Amount of physical memory in bytes. On error, zero is
|
||||
/// returned.
|
||||
|
||||
TUKLIB_DECLS_END
|
||||
#endif
|
||||
50
src/common/tuklib_progname.c
Normal file
50
src/common/tuklib_progname.c
Normal file
@@ -0,0 +1,50 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_progname.c
|
||||
/// \brief Program name to be displayed in messages
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "tuklib_progname.h"
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#if !HAVE_DECL_PROGRAM_INVOCATION_NAME
|
||||
char *progname = NULL;
|
||||
#endif
|
||||
|
||||
|
||||
extern void
|
||||
tuklib_progname_init(char **argv)
|
||||
{
|
||||
#ifdef TUKLIB_DOSLIKE
|
||||
// On these systems, argv[0] always has the full path and .exe
|
||||
// suffix even if the user just types the plain program name.
|
||||
// We modify argv[0] to make it nicer to read.
|
||||
|
||||
// Strip the leading path.
|
||||
char *p = argv[0] + strlen(argv[0]);
|
||||
while (argv[0] < p && p[-1] != '/' && p[-1] != '\\')
|
||||
--p;
|
||||
|
||||
argv[0] = p;
|
||||
|
||||
// Strip the .exe suffix.
|
||||
p = strrchr(p, '.');
|
||||
if (p != NULL)
|
||||
*p = '\0';
|
||||
|
||||
// Make it lowercase.
|
||||
for (p = argv[0]; *p != '\0'; ++p)
|
||||
if (*p >= 'A' && *p <= 'Z')
|
||||
*p = *p - 'A' + 'a';
|
||||
#endif
|
||||
|
||||
progname = argv[0];
|
||||
return;
|
||||
}
|
||||
32
src/common/tuklib_progname.h
Normal file
32
src/common/tuklib_progname.h
Normal file
@@ -0,0 +1,32 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_progname.h
|
||||
/// \brief Program name to be displayed in messages
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_PROGNAME_H
|
||||
#define TUKLIB_PROGNAME_H
|
||||
|
||||
#include "tuklib_common.h"
|
||||
#include <errno.h>
|
||||
|
||||
TUKLIB_DECLS_BEGIN
|
||||
|
||||
#if HAVE_DECL_PROGRAM_INVOCATION_NAME
|
||||
# define progname program_invocation_name
|
||||
#else
|
||||
# define progname TUKLIB_SYMBOL(tuklib_progname)
|
||||
extern char *progname;
|
||||
#endif
|
||||
|
||||
#define tuklib_progname_init TUKLIB_SYMBOL(tuklib_progname_init)
|
||||
extern void tuklib_progname_init(char **argv);
|
||||
|
||||
TUKLIB_DECLS_END
|
||||
#endif
|
||||
@@ -1,47 +1,90 @@
|
||||
##
|
||||
## Copyright (C) 2007 Lasse Collin
|
||||
## Author: Lasse Collin
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
## modify it under the terms of the GNU Lesser General Public
|
||||
## License as published by the Free Software Foundation; either
|
||||
## version 2.1 of the License, or (at your option) any later version.
|
||||
##
|
||||
## This library is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## Lesser General Public License for more details.
|
||||
## This file has been put into the public domain.
|
||||
## You can do whatever you want with this file.
|
||||
##
|
||||
|
||||
SUBDIRS = api common check
|
||||
SUBDIRS = api
|
||||
|
||||
EXTRA_DIST =
|
||||
CLEANFILES =
|
||||
doc_DATA =
|
||||
|
||||
lib_LTLIBRARIES = liblzma.la
|
||||
liblzma_la_SOURCES =
|
||||
liblzma_la_LDFLAGS = -version-info 0:0:0
|
||||
liblzma_la_SOURCES = $(top_srcdir)/src/common/tuklib_physmem.c
|
||||
liblzma_la_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src/liblzma/api \
|
||||
-I$(top_srcdir)/src/liblzma/common \
|
||||
-I$(top_srcdir)/src/liblzma/check \
|
||||
-I$(top_srcdir)/src/liblzma/lz \
|
||||
-I$(top_srcdir)/src/liblzma/rangecoder \
|
||||
-I$(top_srcdir)/src/liblzma/lzma \
|
||||
-I$(top_srcdir)/src/liblzma/delta \
|
||||
-I$(top_srcdir)/src/liblzma/simple \
|
||||
-I$(top_srcdir)/src/common \
|
||||
-DTUKLIB_SYMBOL_PREFIX=lzma_
|
||||
liblzma_la_LDFLAGS = -no-undefined -version-info 5:3:0
|
||||
|
||||
liblzma_la_LIBADD = \
|
||||
common/libcommon.la \
|
||||
check/libcheck.la
|
||||
include $(srcdir)/common/Makefile.inc
|
||||
include $(srcdir)/check/Makefile.inc
|
||||
|
||||
if COND_FILTER_LZMA
|
||||
SUBDIRS += lz lzma rangecoder
|
||||
liblzma_la_LIBADD += \
|
||||
lz/liblz.la \
|
||||
lzma/liblzma4.la \
|
||||
rangecoder/librangecoder.la
|
||||
if COND_FILTER_LZ
|
||||
include $(srcdir)/lz/Makefile.inc
|
||||
endif
|
||||
|
||||
if COND_FILTER_SUBBLOCK
|
||||
SUBDIRS += subblock
|
||||
liblzma_la_LIBADD += subblock/libsubblock.la
|
||||
if COND_FILTER_LZMA1
|
||||
include $(srcdir)/lzma/Makefile.inc
|
||||
include $(srcdir)/rangecoder/Makefile.inc
|
||||
endif
|
||||
|
||||
if COND_MAIN_SIMPLE
|
||||
SUBDIRS += simple
|
||||
liblzma_la_LIBADD += simple/libsimple.la
|
||||
if COND_FILTER_DELTA
|
||||
include $(srcdir)/delta/Makefile.inc
|
||||
endif
|
||||
|
||||
if COND_FILTER_SIMPLE
|
||||
include $(srcdir)/simple/Makefile.inc
|
||||
endif
|
||||
|
||||
|
||||
## Windows-specific stuff
|
||||
|
||||
# Windows resource compiler support. libtool knows what to do with .rc
|
||||
# files, but Automake (<= 1.11 at least) doesn't know.
|
||||
#
|
||||
# We want the resource file only in shared liblzma. To avoid linking it into
|
||||
# static liblzma, we overwrite the static object file with an object file
|
||||
# compiled from empty input. Note that GNU-specific features are OK here,
|
||||
# because on Windows we are compiled with the GNU toolchain.
|
||||
.rc.lo:
|
||||
$(LIBTOOL) --mode=compile $(RC) $(DEFS) $(DEFAULT_INCLUDES) \
|
||||
$(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) \
|
||||
-i $< -o $@
|
||||
echo > empty.c
|
||||
$(COMPILE) -c empty.c -o $(*D)/$(*F).o
|
||||
|
||||
# Remove ordinals from the generated .def file. People must link by name,
|
||||
# not by ordinal, because no one is going to track the ordinal numbers.
|
||||
liblzma.def: liblzma.la liblzma.def.in
|
||||
sed 's/ \+@ *[0-9]\+//' liblzma.def.in > liblzma.def
|
||||
|
||||
# Creating liblzma.def.in is a side effect of linking the library.
|
||||
liblzma.def.in: liblzma.la
|
||||
|
||||
if COND_W32
|
||||
CLEANFILES += liblzma.def liblzma.def.in empty.c
|
||||
liblzma_la_SOURCES += liblzma_w32res.rc
|
||||
liblzma_la_LDFLAGS += -Xlinker --output-def -Xlinker liblzma.def.in
|
||||
|
||||
## liblzma.def.in is created only when building shared liblzma, so don't
|
||||
## try to create liblzma.def when not building shared liblzma.
|
||||
if COND_SHARED
|
||||
doc_DATA += liblzma.def
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
## pkg-config
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = lzma.pc
|
||||
EXTRA_DIST = lzma.pc.in
|
||||
pkgconfig_DATA = liblzma.pc
|
||||
EXTRA_DIST += liblzma.pc.in
|
||||
|
||||
@@ -1,39 +1,23 @@
|
||||
##
|
||||
## Copyright (C) 2007 Lasse Collin
|
||||
## Author: Lasse Collin
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
## modify it under the terms of the GNU Lesser General Public
|
||||
## License as published by the Free Software Foundation; either
|
||||
## version 2.1 of the License, or (at your option) any later version.
|
||||
##
|
||||
## This library is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## Lesser General Public License for more details.
|
||||
## This file has been put into the public domain.
|
||||
## You can do whatever you want with this file.
|
||||
##
|
||||
|
||||
nobase_include_HEADERS = \
|
||||
lzma.h \
|
||||
lzma/alignment.h \
|
||||
lzma/alone.h \
|
||||
lzma/auto.h \
|
||||
lzma/base.h \
|
||||
lzma/bcj.h \
|
||||
lzma/block.h \
|
||||
lzma/check.h \
|
||||
lzma/copy.h \
|
||||
lzma/container.h \
|
||||
lzma/delta.h \
|
||||
lzma/extra.h \
|
||||
lzma/filter.h \
|
||||
lzma/hardware.h \
|
||||
lzma/index.h \
|
||||
lzma/info.h \
|
||||
lzma/init.h \
|
||||
lzma/index_hash.h \
|
||||
lzma/lzma.h \
|
||||
lzma/memlimit.h \
|
||||
lzma/metadata.h \
|
||||
lzma/raw.h \
|
||||
lzma/simple.h \
|
||||
lzma/stream.h \
|
||||
lzma/stream_flags.h \
|
||||
lzma/subblock.h \
|
||||
lzma/version.h \
|
||||
lzma/vli.h
|
||||
|
||||
@@ -1,64 +1,264 @@
|
||||
/**
|
||||
* \file lzma.h
|
||||
* \brief The public API of liblzma
|
||||
* \file api/lzma.h
|
||||
* \brief The public API of liblzma data compression library
|
||||
*
|
||||
* liblzma is a LZMA compression library with a zlib-like API.
|
||||
* liblzma is based on LZMA SDK found from http://7-zip.org/sdk.html.
|
||||
* liblzma is a public domain general-purpose data compression library with
|
||||
* a zlib-like API. The native file format is .xz, but also the old .lzma
|
||||
* format and raw (no headers) streams are supported. Multiple compression
|
||||
* algorithms (filters) are supported. Currently LZMA2 is the primary filter.
|
||||
*
|
||||
* \author Copyright (C) 1999-2006 Igor Pavlov
|
||||
* \author Copyright (C) 2007 Lasse Collin
|
||||
* liblzma is part of XZ Utils <http://tukaani.org/xz/>. XZ Utils includes
|
||||
* a gzip-like command line tool named xz and some other tools. XZ Utils
|
||||
* is developed and maintained by Lasse Collin.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
* Major parts of liblzma are based on Igor Pavlov's public domain LZMA SDK
|
||||
* <http://7-zip.org/sdk.html>.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
* The SHA-256 implementation is based on the public domain code found from
|
||||
* 7-Zip <http://7-zip.org/>, which has a modified version of the public
|
||||
* domain SHA-256 code found from Crypto++ <http://www.cryptopp.com/>.
|
||||
* The SHA-256 code in Crypto++ was written by Kevin Springle and Wei Dai.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H
|
||||
#define LZMA_H
|
||||
|
||||
/********************
|
||||
* External headers *
|
||||
********************/
|
||||
/*****************************
|
||||
* Required standard headers *
|
||||
*****************************/
|
||||
|
||||
/* size_t */
|
||||
#include <sys/types.h>
|
||||
/*
|
||||
* liblzma API headers need some standard types and macros. To allow
|
||||
* including lzma.h without requiring the application to include other
|
||||
* headers first, lzma.h includes the required standard headers unless
|
||||
* they already seem to be included already or if LZMA_MANUAL_HEADERS
|
||||
* has been defined.
|
||||
*
|
||||
* Here's what types and macros are needed and from which headers:
|
||||
* - stddef.h: size_t, NULL
|
||||
* - stdint.h: uint8_t, uint32_t, uint64_t, UINT32_C(n), uint64_C(n),
|
||||
* UINT32_MAX, UINT64_MAX
|
||||
*
|
||||
* However, inttypes.h is a little more portable than stdint.h, although
|
||||
* inttypes.h declares some unneeded things compared to plain stdint.h.
|
||||
*
|
||||
* The hacks below aren't perfect, specifically they assume that inttypes.h
|
||||
* exists and that it typedefs at least uint8_t, uint32_t, and uint64_t,
|
||||
* and that, in case of incomplete inttypes.h, unsigned int is 32-bit.
|
||||
* If the application already takes care of setting up all the types and
|
||||
* macros properly (for example by using gnulib's stdint.h or inttypes.h),
|
||||
* we try to detect that the macros are already defined and don't include
|
||||
* inttypes.h here again. However, you may define LZMA_MANUAL_HEADERS to
|
||||
* force this file to never include any system headers.
|
||||
*
|
||||
* Some could argue that liblzma API should provide all the required types,
|
||||
* for example lzma_uint64, LZMA_UINT64_C(n), and LZMA_UINT64_MAX. This was
|
||||
* seen as an unnecessary mess, since most systems already provide all the
|
||||
* necessary types and macros in the standard headers.
|
||||
*
|
||||
* Note that liblzma API still has lzma_bool, because using stdbool.h would
|
||||
* break C89 and C++ programs on many systems. sizeof(bool) in C99 isn't
|
||||
* necessarily the same as sizeof(bool) in C++.
|
||||
*/
|
||||
|
||||
/* NULL */
|
||||
#include <stddef.h>
|
||||
#ifndef LZMA_MANUAL_HEADERS
|
||||
/*
|
||||
* I suppose this works portably also in C++. Note that in C++,
|
||||
* we need to get size_t into the global namespace.
|
||||
*/
|
||||
# include <stddef.h>
|
||||
|
||||
/* uint8_t, uint32_t, uint64_t, UINT32_C, UINT64_C, UINT64_MAX. */
|
||||
#include <inttypes.h>
|
||||
/*
|
||||
* Skip inttypes.h if we already have all the required macros. If we
|
||||
* have the macros, we assume that we have the matching typedefs too.
|
||||
*/
|
||||
# if !defined(UINT32_C) || !defined(UINT64_C) \
|
||||
|| !defined(UINT32_MAX) || !defined(UINT64_MAX)
|
||||
/*
|
||||
* MSVC has no C99 support, and thus it cannot be used to
|
||||
* compile liblzma. The liblzma API has to still be usable
|
||||
* from MSVC, so we need to define the required standard
|
||||
* integer types here.
|
||||
*/
|
||||
# if defined(_WIN32) && defined(_MSC_VER)
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
# else
|
||||
/* Use the standard inttypes.h. */
|
||||
# ifdef __cplusplus
|
||||
/*
|
||||
* C99 sections 7.18.2 and 7.18.4 specify
|
||||
* that C++ implementations define the limit
|
||||
* and constant macros only if specifically
|
||||
* requested. Note that if you want the
|
||||
* format macros (PRIu64 etc.) too, you need
|
||||
* to define __STDC_FORMAT_MACROS before
|
||||
* including lzma.h, since re-including
|
||||
* inttypes.h with __STDC_FORMAT_MACROS
|
||||
* defined doesn't necessarily work.
|
||||
*/
|
||||
# ifndef __STDC_LIMIT_MACROS
|
||||
# define __STDC_LIMIT_MACROS 1
|
||||
# endif
|
||||
# ifndef __STDC_CONSTANT_MACROS
|
||||
# define __STDC_CONSTANT_MACROS 1
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# include <inttypes.h>
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Some old systems have only the typedefs in inttypes.h, and
|
||||
* lack all the macros. For those systems, we need a few more
|
||||
* hacks. We assume that unsigned int is 32-bit and unsigned
|
||||
* long is either 32-bit or 64-bit. If these hacks aren't
|
||||
* enough, the application has to setup the types manually
|
||||
* before including lzma.h.
|
||||
*/
|
||||
# ifndef UINT32_C
|
||||
# if defined(_WIN32) && defined(_MSC_VER)
|
||||
# define UINT32_C(n) n ## UI32
|
||||
# else
|
||||
# define UINT32_C(n) n ## U
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef UINT64_C
|
||||
# if defined(_WIN32) && defined(_MSC_VER)
|
||||
# define UINT64_C(n) n ## UI64
|
||||
# else
|
||||
/* Get ULONG_MAX. */
|
||||
# include <limits.h>
|
||||
# if ULONG_MAX == 4294967295UL
|
||||
# define UINT64_C(n) n ## ULL
|
||||
# else
|
||||
# define UINT64_C(n) n ## UL
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef UINT32_MAX
|
||||
# define UINT32_MAX (UINT32_C(4294967295))
|
||||
# endif
|
||||
|
||||
# ifndef UINT64_MAX
|
||||
# define UINT64_MAX (UINT64_C(18446744073709551615))
|
||||
# endif
|
||||
# endif
|
||||
#endif /* ifdef LZMA_MANUAL_HEADERS */
|
||||
|
||||
|
||||
/******************
|
||||
* GCC extensions *
|
||||
* LZMA_API macro *
|
||||
******************/
|
||||
|
||||
/*
|
||||
* GCC extensions are used conditionally in the public API. It doesn't
|
||||
* Some systems require that the functions and function pointers are
|
||||
* declared specially in the headers. LZMA_API_IMPORT is for importing
|
||||
* symbols and LZMA_API_CALL is to specify the calling convention.
|
||||
*
|
||||
* By default it is assumed that the application will link dynamically
|
||||
* against liblzma. #define LZMA_API_STATIC in your application if you
|
||||
* want to link against static liblzma. If you don't care about portability
|
||||
* to operating systems like Windows, or at least don't care about linking
|
||||
* against static liblzma on them, don't worry about LZMA_API_STATIC. That
|
||||
* is, most developers will never need to use LZMA_API_STATIC.
|
||||
*
|
||||
* The GCC variants are a special case on Windows (Cygwin and MinGW).
|
||||
* We rely on GCC doing the right thing with its auto-import feature,
|
||||
* and thus don't use __declspec(dllimport). This way developers don't
|
||||
* need to worry about LZMA_API_STATIC. Also the calling convention is
|
||||
* omitted on Cygwin but not on MinGW.
|
||||
*/
|
||||
#ifndef LZMA_API_IMPORT
|
||||
# if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
|
||||
# define LZMA_API_IMPORT __declspec(dllimport)
|
||||
# else
|
||||
# define LZMA_API_IMPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LZMA_API_CALL
|
||||
# if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
# define LZMA_API_CALL __cdecl
|
||||
# else
|
||||
# define LZMA_API_CALL
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LZMA_API
|
||||
# define LZMA_API(type) LZMA_API_IMPORT type LZMA_API_CALL
|
||||
#endif
|
||||
|
||||
|
||||
/***********
|
||||
* nothrow *
|
||||
***********/
|
||||
|
||||
/*
|
||||
* None of the functions in liblzma may throw an exception. Even
|
||||
* the functions that use callback functions won't throw exceptions,
|
||||
* because liblzma would break if a callback function threw an exception.
|
||||
*/
|
||||
#ifndef lzma_nothrow
|
||||
# if defined(__cplusplus)
|
||||
# define lzma_nothrow throw()
|
||||
# elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
|
||||
# define lzma_nothrow __attribute__((__nothrow__))
|
||||
# else
|
||||
# define lzma_nothrow
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/********************
|
||||
* GNU C extensions *
|
||||
********************/
|
||||
|
||||
/*
|
||||
* GNU C extensions are used conditionally in the public API. It doesn't
|
||||
* break anything if these are sometimes enabled and sometimes not, only
|
||||
* affects warnings and optimizations.
|
||||
*/
|
||||
#if defined(__GNUC__) && __GNUC__ >= 3
|
||||
#if __GNUC__ >= 3
|
||||
# ifndef lzma_attribute
|
||||
# define lzma_attribute(attr) __attribute__(attr)
|
||||
# endif
|
||||
# ifndef lzma_restrict
|
||||
# define lzma_restrict __restrict__
|
||||
|
||||
/* warn_unused_result was added in GCC 3.4. */
|
||||
# ifndef lzma_attr_warn_unused_result
|
||||
# if __GNUC__ == 3 && __GNUC_MINOR__ < 4
|
||||
# define lzma_attr_warn_unused_result
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#else
|
||||
# ifndef lzma_attribute
|
||||
# define lzma_attribute(attr)
|
||||
# endif
|
||||
# ifndef lzma_restrict
|
||||
# define lzma_restrict
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef lzma_attr_pure
|
||||
# define lzma_attr_pure lzma_attribute((__pure__))
|
||||
#endif
|
||||
|
||||
#ifndef lzma_attr_const
|
||||
# define lzma_attr_const lzma_attribute((__const__))
|
||||
#endif
|
||||
|
||||
#ifndef lzma_attr_warn_unused_result
|
||||
# define lzma_attr_warn_unused_result \
|
||||
lzma_attribute((__warn_unused_result__))
|
||||
#endif
|
||||
|
||||
|
||||
@@ -77,37 +277,28 @@ extern "C" {
|
||||
#define LZMA_H_INTERNAL 1
|
||||
|
||||
/* Basic features */
|
||||
#include "lzma/init.h"
|
||||
#include "lzma/version.h"
|
||||
#include "lzma/base.h"
|
||||
#include "lzma/vli.h"
|
||||
#include "lzma/filter.h"
|
||||
#include "lzma/check.h"
|
||||
|
||||
/* Filters */
|
||||
#include "lzma/copy.h"
|
||||
#include "lzma/subblock.h"
|
||||
#include "lzma/simple.h"
|
||||
#include "lzma/filter.h"
|
||||
#include "lzma/bcj.h"
|
||||
#include "lzma/delta.h"
|
||||
#include "lzma/lzma.h"
|
||||
|
||||
/* Container formats and Metadata */
|
||||
#include "lzma/block.h"
|
||||
#include "lzma/index.h"
|
||||
#include "lzma/extra.h"
|
||||
#include "lzma/metadata.h"
|
||||
#include "lzma/stream.h"
|
||||
#include "lzma/alone.h"
|
||||
#include "lzma/raw.h"
|
||||
#include "lzma/auto.h"
|
||||
/* Container formats */
|
||||
#include "lzma/container.h"
|
||||
|
||||
/* Advanced features */
|
||||
#include "lzma/info.h"
|
||||
#include "lzma/alignment.h"
|
||||
#include "lzma/stream_flags.h"
|
||||
#include "lzma/memlimit.h"
|
||||
#include "lzma/block.h"
|
||||
#include "lzma/index.h"
|
||||
#include "lzma/index_hash.h"
|
||||
|
||||
/* Version number */
|
||||
#include "lzma/version.h"
|
||||
/* Hardware information */
|
||||
#include "lzma/hardware.h"
|
||||
|
||||
/*
|
||||
* All subheaders included. Undefine LZMA_H_INTERNAL to prevent applications
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
/**
|
||||
* \file lzma/alignment.h
|
||||
* \brief Calculating input and output alignment of filter chains
|
||||
*
|
||||
* \author Copyright (C) 1999-2006 Igor Pavlov
|
||||
* \author Copyright (C) 2007 Lasse Collin
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
# error Never include this file directly. Use <lzma.h> instead.
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculates the preferred alignment of the input data
|
||||
*
|
||||
* FIXME desc
|
||||
*/
|
||||
extern uint32_t lzma_alignment_input(
|
||||
const lzma_options_filter *filters, uint32_t guess);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculates the alignment of the encoded output
|
||||
*
|
||||
* Knowing the alignment of the output data is useful e.g. in the Block
|
||||
* encoder which tries to align the Compressed Data field optimally.
|
||||
*
|
||||
* \param filters Pointer to lzma_options_filter array, whose last
|
||||
* member must have .id = LZMA_VLI_VALUE_UNKNOWN.
|
||||
* \param guess The value to return if the alignment of the output
|
||||
* is the same as the alignment of the input data.
|
||||
* If you want to always detect this special case,
|
||||
* this guess to zero; this function never returns
|
||||
* zero unless guess is zero.
|
||||
*
|
||||
* \return In most cases, a small positive integer is returned;
|
||||
* for optimal use, the encoded output of this filter
|
||||
* chain should start at on offset that is a multiple of
|
||||
* the returned integer value.
|
||||
*
|
||||
* If the alignment of the output is the same as the input
|
||||
* data (which this function cannot know), \a guess is
|
||||
* returned.
|
||||
*
|
||||
* If an error occurs (that is, unknown Filter IDs or filter
|
||||
* options), UINT32_MAX is returned.
|
||||
*/
|
||||
extern uint32_t lzma_alignment_output(
|
||||
const lzma_options_filter *filters, uint32_t guess);
|
||||
@@ -1,82 +0,0 @@
|
||||
/**
|
||||
* \file lzma/alone.h
|
||||
* \brief Handling of the legacy LZMA_Alone format
|
||||
*
|
||||
* \author Copyright (C) 1999-2006 Igor Pavlov
|
||||
* \author Copyright (C) 2007 Lasse Collin
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
# error Never include this file directly. Use <lzma.h> instead.
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* \brief Options for files in the LZMA_Alone format
|
||||
*/
|
||||
typedef struct {
|
||||
/**
|
||||
* \brief Uncompressed Size and usage of End of Payload Marker
|
||||
*
|
||||
* In contrast to .lzma Blocks, LZMA_Alone format cannot have both
|
||||
* uncompressed size field in the header and end of payload marker.
|
||||
* If you don't know the uncompressed size beforehand, set it to
|
||||
* LZMA_VLI_VALUE_UNKNOWN and liblzma will embed end of payload
|
||||
* marker.
|
||||
*/
|
||||
lzma_vli uncompressed_size;
|
||||
|
||||
/**
|
||||
* \brief LZMA options
|
||||
*
|
||||
* The LZMA_Alone format supports only one filter: the LZMA filter.
|
||||
*
|
||||
* \note There exists also an undocumented variant of the
|
||||
* LZMA_Alone format, which uses the x86 filter in
|
||||
* addition to LZMA. This format was never supported
|
||||
* by LZMA Utils and is not supported by liblzma either.
|
||||
*/
|
||||
lzma_options_lzma lzma;
|
||||
|
||||
} lzma_options_alone;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Initializes LZMA_Alone encoder
|
||||
*
|
||||
* LZMA_Alone files have the suffix .lzma like the .lzma Stream files.
|
||||
* LZMA_Alone format supports only one filter, the LZMA filter. There is
|
||||
* no support for integrity checks like CRC32.
|
||||
*
|
||||
* Use this format if and only if you need to create files readable by
|
||||
* legacy LZMA tools.
|
||||
*
|
||||
* LZMA_Alone encoder doesn't support LZMA_SYNC_FLUSH or LZMA_FULL_FLUSH.
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern lzma_ret lzma_alone_encoder(
|
||||
lzma_stream *strm, const lzma_options_alone *options);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Initializes decoder for LZMA_Alone file
|
||||
*
|
||||
* The LZMA_Alone decoder supports LZMA_SYNC_FLUSH.
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* - LZMA_MEM_ERROR
|
||||
*/
|
||||
extern lzma_ret lzma_alone_decoder(lzma_stream *strm);
|
||||
@@ -1,41 +0,0 @@
|
||||
/**
|
||||
* \file lzma/auto.h
|
||||
* \brief Decoder with automatic file format detection
|
||||
*
|
||||
* \author Copyright (C) 1999-2006 Igor Pavlov
|
||||
* \author Copyright (C) 2007 Lasse Collin
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
# error Never include this file directly. Use <lzma.h> instead.
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decode .lzma Streams and LZMA_Alone files with autodetection
|
||||
*
|
||||
* Autodetects between the .lzma Stream and LZMA_Alone formats, and
|
||||
* calls lzma_stream_decoder_init() or lzma_alone_decoder_init() once
|
||||
* the type of the file has been detected.
|
||||
*
|
||||
* \param strm Pointer to propertily prepared lzma_stream
|
||||
* \param header Pointer to hold a pointer to Extra Records read
|
||||
* from the Header Metadata Block. Use NULL if
|
||||
* you don't care about Extra Records.
|
||||
* \param footer Same as header, but for Footer Metadata Block.
|
||||
*
|
||||
* \return - LZMA_OK: Initialization was successful.
|
||||
* - LZMA_MEM_ERROR: Cannot allocate memory.
|
||||
*/
|
||||
extern lzma_ret lzma_auto_decoder(lzma_stream *strm,
|
||||
lzma_extra **header, lzma_extra **footer);
|
||||
@@ -1,19 +1,15 @@
|
||||
/**
|
||||
* \file lzma/base.h
|
||||
* \brief Data types and functions used in many places of the public API
|
||||
* \brief Data types and functions used in many places in liblzma API
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* \author Copyright (C) 1999-2006 Igor Pavlov
|
||||
* \author Copyright (C) 2007 Lasse Collin
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
@@ -33,28 +29,193 @@
|
||||
typedef unsigned char lzma_bool;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Type of reserved enumeration variable in structures
|
||||
*
|
||||
* To avoid breaking library ABI when new features are added, several
|
||||
* structures contain extra variables that may be used in future. Since
|
||||
* sizeof(enum) can be different than sizeof(int), and sizeof(enum) may
|
||||
* even vary depending on the range of enumeration constants, we specify
|
||||
* a separate type to be used for reserved enumeration variables. All
|
||||
* enumeration constants in liblzma API will be non-negative and less
|
||||
* than 128, which should guarantee that the ABI won't break even when
|
||||
* new constants are added to existing enumerations.
|
||||
*/
|
||||
typedef enum {
|
||||
LZMA_RESERVED_ENUM = 0
|
||||
} lzma_reserved_enum;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Return values used by several functions in liblzma
|
||||
*
|
||||
* Check the descriptions of specific functions to find out which return
|
||||
* values they can return and the exact meanings of the values in every
|
||||
* situation. The descriptions given here are only suggestive.
|
||||
* values they can return. With some functions the return values may have
|
||||
* more specific meanings than described here; those differences are
|
||||
* described per-function basis.
|
||||
*/
|
||||
typedef enum {
|
||||
LZMA_OK = 0,
|
||||
LZMA_OK = 0,
|
||||
/**<
|
||||
* \brief Operation completed successfully
|
||||
*/
|
||||
|
||||
LZMA_STREAM_END = 1,
|
||||
LZMA_STREAM_END = 1,
|
||||
/**<
|
||||
* \brief End of stream was reached
|
||||
*
|
||||
* The application should pick the last remaining output
|
||||
* bytes from strm->next_out.
|
||||
* In encoder, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or
|
||||
* LZMA_FINISH was finished. In decoder, this indicates
|
||||
* that all the data was successfully decoded.
|
||||
*
|
||||
* In all cases, when LZMA_STREAM_END is returned, the last
|
||||
* output bytes should be picked from strm->next_out.
|
||||
*/
|
||||
|
||||
LZMA_PROG_ERROR = -2,
|
||||
LZMA_NO_CHECK = 2,
|
||||
/**<
|
||||
* \brief Input stream has no integrity check
|
||||
*
|
||||
* This return value can be returned only if the
|
||||
* LZMA_TELL_NO_CHECK flag was used when initializing
|
||||
* the decoder. LZMA_NO_CHECK is just a warning, and
|
||||
* the decoding can be continued normally.
|
||||
*
|
||||
* It is possible to call lzma_get_check() immediately after
|
||||
* lzma_code has returned LZMA_NO_CHECK. The result will
|
||||
* naturally be LZMA_CHECK_NONE, but the possibility to call
|
||||
* lzma_get_check() may be convenient in some applications.
|
||||
*/
|
||||
|
||||
LZMA_UNSUPPORTED_CHECK = 3,
|
||||
/**<
|
||||
* \brief Cannot calculate the integrity check
|
||||
*
|
||||
* The usage of this return value is different in encoders
|
||||
* and decoders.
|
||||
*
|
||||
* Encoders can return this value only from the initialization
|
||||
* function. If initialization fails with this value, the
|
||||
* encoding cannot be done, because there's no way to produce
|
||||
* output with the correct integrity check.
|
||||
*
|
||||
* Decoders can return this value only from lzma_code() and
|
||||
* only if the LZMA_TELL_UNSUPPORTED_CHECK flag was used when
|
||||
* initializing the decoder. The decoding can still be
|
||||
* continued normally even if the check type is unsupported,
|
||||
* but naturally the check will not be validated, and possible
|
||||
* errors may go undetected.
|
||||
*
|
||||
* With decoder, it is possible to call lzma_get_check()
|
||||
* immediately after lzma_code() has returned
|
||||
* LZMA_UNSUPPORTED_CHECK. This way it is possible to find
|
||||
* out what the unsupported Check ID was.
|
||||
*/
|
||||
|
||||
LZMA_GET_CHECK = 4,
|
||||
/**<
|
||||
* \brief Integrity check type is now available
|
||||
*
|
||||
* This value can be returned only by the lzma_code() function
|
||||
* and only if the decoder was initialized with the
|
||||
* LZMA_TELL_ANY_CHECK flag. LZMA_GET_CHECK tells the
|
||||
* application that it may now call lzma_get_check() to find
|
||||
* out the Check ID. This can be used, for example, to
|
||||
* implement a decoder that accepts only files that have
|
||||
* strong enough integrity check.
|
||||
*/
|
||||
|
||||
LZMA_MEM_ERROR = 5,
|
||||
/**<
|
||||
* \brief Cannot allocate memory
|
||||
*
|
||||
* Memory allocation failed, or the size of the allocation
|
||||
* would be greater than SIZE_MAX.
|
||||
*
|
||||
* Due to internal implementation reasons, the coding cannot
|
||||
* be continued even if more memory were made available after
|
||||
* LZMA_MEM_ERROR.
|
||||
*/
|
||||
|
||||
LZMA_MEMLIMIT_ERROR = 6,
|
||||
/**
|
||||
* \brief Memory usage limit was reached
|
||||
*
|
||||
* Decoder would need more memory than allowed by the
|
||||
* specified memory usage limit. To continue decoding,
|
||||
* the memory usage limit has to be increased with
|
||||
* lzma_memlimit_set().
|
||||
*/
|
||||
|
||||
LZMA_FORMAT_ERROR = 7,
|
||||
/**<
|
||||
* \brief File format not recognized
|
||||
*
|
||||
* The decoder did not recognize the input as supported file
|
||||
* format. This error can occur, for example, when trying to
|
||||
* decode .lzma format file with lzma_stream_decoder,
|
||||
* because lzma_stream_decoder accepts only the .xz format.
|
||||
*/
|
||||
|
||||
LZMA_OPTIONS_ERROR = 8,
|
||||
/**<
|
||||
* \brief Invalid or unsupported options
|
||||
*
|
||||
* Invalid or unsupported options, for example
|
||||
* - unsupported filter(s) or filter options; or
|
||||
* - reserved bits set in headers (decoder only).
|
||||
*
|
||||
* Rebuilding liblzma with more features enabled, or
|
||||
* upgrading to a newer version of liblzma may help.
|
||||
*/
|
||||
|
||||
LZMA_DATA_ERROR = 9,
|
||||
/**<
|
||||
* \brief Data is corrupt
|
||||
*
|
||||
* The usage of this return value is different in encoders
|
||||
* and decoders. In both encoder and decoder, the coding
|
||||
* cannot continue after this error.
|
||||
*
|
||||
* Encoders return this if size limits of the target file
|
||||
* format would be exceeded. These limits are huge, thus
|
||||
* getting this error from an encoder is mostly theoretical.
|
||||
* For example, the maximum compressed and uncompressed
|
||||
* size of a .xz Stream is roughly 8 EiB (2^63 bytes).
|
||||
*
|
||||
* Decoders return this error if the input data is corrupt.
|
||||
* This can mean, for example, invalid CRC32 in headers
|
||||
* or invalid check of uncompressed data.
|
||||
*/
|
||||
|
||||
LZMA_BUF_ERROR = 10,
|
||||
/**<
|
||||
* \brief No progress is possible
|
||||
*
|
||||
* This error code is returned when the coder cannot consume
|
||||
* any new input and produce any new output. The most common
|
||||
* reason for this error is that the input stream being
|
||||
* decoded is truncated or corrupt.
|
||||
*
|
||||
* This error is not fatal. Coding can be continued normally
|
||||
* by providing more input and/or more output space, if
|
||||
* possible.
|
||||
*
|
||||
* Typically the first call to lzma_code() that can do no
|
||||
* progress returns LZMA_OK instead of LZMA_BUF_ERROR. Only
|
||||
* the second consecutive call doing no progress will return
|
||||
* LZMA_BUF_ERROR. This is intentional.
|
||||
*
|
||||
* With zlib, Z_BUF_ERROR may be returned even if the
|
||||
* application is doing nothing wrong, so apps will need
|
||||
* to handle Z_BUF_ERROR specially. The above hack
|
||||
* guarantees that liblzma never returns LZMA_BUF_ERROR
|
||||
* to properly written applications unless the input file
|
||||
* is truncated or corrupt. This should simplify the
|
||||
* applications a little.
|
||||
*/
|
||||
|
||||
LZMA_PROG_ERROR = 11,
|
||||
/**<
|
||||
* \brief Programming error
|
||||
*
|
||||
@@ -73,70 +234,24 @@ typedef enum {
|
||||
* can be a sign of a bug in liblzma. See the documentation
|
||||
* how to report bugs.
|
||||
*/
|
||||
|
||||
LZMA_DATA_ERROR = -3,
|
||||
/**<
|
||||
* \brief Data is corrupt
|
||||
*
|
||||
* - Encoder: The input size doesn't match the uncompressed
|
||||
* size given to lzma_*_encoder_init().
|
||||
* - Decoder: The input is corrupt. This includes corrupted
|
||||
* header, corrupted compressed data, and unmatching
|
||||
* integrity Check.
|
||||
*
|
||||
* \todo What can be done if encoder returns this?
|
||||
* Probably can continue by fixing the input
|
||||
* amount, but make sure.
|
||||
*/
|
||||
|
||||
LZMA_MEM_ERROR = -4,
|
||||
/**<
|
||||
* \brief Cannot allocate memory
|
||||
*
|
||||
* Memory allocation failed.
|
||||
*/
|
||||
|
||||
LZMA_BUF_ERROR = -5,
|
||||
/**<
|
||||
* \brief No progress is possible
|
||||
*
|
||||
* This may happen when avail_in or avail_out is zero.
|
||||
*
|
||||
* \note This error is not fatal. Coding can continue
|
||||
* normally once the reason for this error has
|
||||
* been fixed.
|
||||
*/
|
||||
|
||||
LZMA_HEADER_ERROR = -6,
|
||||
/**<
|
||||
* \brief Invalid or unsupported header
|
||||
*
|
||||
* Invalid or unsupported options, for example
|
||||
* - unsupported filter(s) or filter options; or
|
||||
* - reserved bits set in headers (decoder only).
|
||||
*
|
||||
* Rebuilding liblzma with more features enabled, or
|
||||
* upgrading to a newer version of liblzma may help.
|
||||
*/
|
||||
|
||||
LZMA_UNSUPPORTED_CHECK = -7,
|
||||
/**<
|
||||
* \brief Check type is unknown
|
||||
*
|
||||
* The type of Check is not supported, and thus the Check
|
||||
* cannot be calculated. In the encoder, this is an error.
|
||||
* In the decoder, this is only a warning and decoding can
|
||||
* still proceed normally (but the Check is ignored).
|
||||
*/
|
||||
} lzma_ret;
|
||||
|
||||
|
||||
/**
|
||||
* \brief The `action' argument for lzma_code()
|
||||
*
|
||||
* After the first use of LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or LZMA_FINISH,
|
||||
* the same `action' must is used until lzma_code() returns LZMA_STREAM_END.
|
||||
* Also, the amount of input (that is, strm->avail_in) must not be modified
|
||||
* by the application until lzma_code() returns LZMA_STREAM_END. Changing the
|
||||
* `action' or modifying the amount of input will make lzma_code() return
|
||||
* LZMA_PROG_ERROR.
|
||||
*/
|
||||
typedef enum {
|
||||
LZMA_RUN = 0,
|
||||
/**<
|
||||
* \brief Continue coding
|
||||
*
|
||||
* Encoder: Encode as much input as possible. Some internal
|
||||
* buffering will probably be done (depends on the filter
|
||||
* chain in use), which causes latency: the input used won't
|
||||
@@ -144,55 +259,65 @@ typedef enum {
|
||||
* lzma_code() call.
|
||||
*
|
||||
* Decoder: Decode as much input as possible and produce as
|
||||
* much output as possible. This action provides best
|
||||
* throughput, but may introduce latency, because the
|
||||
* decoder may decode more data into its internal buffers
|
||||
* than that fits into next_out.
|
||||
* much output as possible.
|
||||
*/
|
||||
|
||||
LZMA_SYNC_FLUSH = 1,
|
||||
/**<
|
||||
* Encoder: Makes all the data given to liblzma via next_in
|
||||
* available in next_out without resetting the filters. Call
|
||||
* lzma_code() with LZMA_SYNC_FLUSH until it returns
|
||||
* LZMA_STREAM_END. Then continue encoding normally.
|
||||
* \brief Make all the input available at output
|
||||
*
|
||||
* \note Synchronous flushing is supported only by
|
||||
* some filters. Some filters support it only
|
||||
* partially.
|
||||
* Normally the encoder introduces some latency.
|
||||
* LZMA_SYNC_FLUSH forces all the buffered data to be
|
||||
* available at output without resetting the internal
|
||||
* state of the encoder. This way it is possible to use
|
||||
* compressed stream for example for communication over
|
||||
* network.
|
||||
*
|
||||
* Decoder: Asks the decoder to decode only as much as is
|
||||
* needed to fill next_out. This decreases latency with some
|
||||
* filters, but is likely to decrease also throughput. It is
|
||||
* a good idea to use this flag only when it is likely that
|
||||
* you don't need more output soon.
|
||||
* Only some filters support LZMA_SYNC_FLUSH. Trying to use
|
||||
* LZMA_SYNC_FLUSH with filters that don't support it will
|
||||
* make lzma_code() return LZMA_OPTIONS_ERROR. For example,
|
||||
* LZMA1 doesn't support LZMA_SYNC_FLUSH but LZMA2 does.
|
||||
*
|
||||
* \note With decoder, this is not comparable to
|
||||
* zlib's Z_SYNC_FLUSH.
|
||||
* Using LZMA_SYNC_FLUSH very often can dramatically reduce
|
||||
* the compression ratio. With some filters (for example,
|
||||
* LZMA2), fine-tuning the compression options may help
|
||||
* mitigate this problem significantly (for example,
|
||||
* match finder with LZMA2).
|
||||
*
|
||||
* Decoders don't support LZMA_SYNC_FLUSH.
|
||||
*/
|
||||
|
||||
LZMA_FULL_FLUSH = 2,
|
||||
/**<
|
||||
* Finishes encoding of the current Data Block. All the input
|
||||
* data going to the current Data Block must have been given
|
||||
* to the encoder (the last bytes can still be pending in
|
||||
* next_in). Call lzma_code() with LZMA_FULL_FLUSH until
|
||||
* it returns LZMA_STREAM_END. Then continue normally with
|
||||
* LZMA_RUN or finish the Stream with LZMA_FINISH.
|
||||
* \brief Finish encoding of the current Block
|
||||
*
|
||||
* This action is supported only by Multi-Block Stream
|
||||
* encoder. If there is no unfinished Data Block, no empty
|
||||
* Data Block is created.
|
||||
* All the input data going to the current Block must have
|
||||
* been given to the encoder (the last bytes can still be
|
||||
* pending in* next_in). Call lzma_code() with LZMA_FULL_FLUSH
|
||||
* until it returns LZMA_STREAM_END. Then continue normally
|
||||
* with LZMA_RUN or finish the Stream with LZMA_FINISH.
|
||||
*
|
||||
* This action is currently supported only by Stream encoder
|
||||
* and easy encoder (which uses Stream encoder). If there is
|
||||
* no unfinished Block, no empty Block is created.
|
||||
*/
|
||||
|
||||
LZMA_FINISH = 3
|
||||
/**<
|
||||
* Finishes the encoding operation. All the input data must
|
||||
* have been given to the encoder (the last bytes can still
|
||||
* be pending in next_in). Call lzma_code() with LZMA_FINISH
|
||||
* until it returns LZMA_STREAM_END.
|
||||
* \brief Finish the coding operation
|
||||
*
|
||||
* This action is not supported by decoders.
|
||||
* All the input data must have been given to the encoder
|
||||
* (the last bytes can still be pending in next_in).
|
||||
* Call lzma_code() with LZMA_FINISH until it returns
|
||||
* LZMA_STREAM_END. Once LZMA_FINISH has been used,
|
||||
* the amount of input must no longer be changed by
|
||||
* the application.
|
||||
*
|
||||
* When decoding, using LZMA_FINISH is optional unless the
|
||||
* LZMA_CONCATENATED flag was used when the decoder was
|
||||
* initialized. When LZMA_CONCATENATED was not used, the only
|
||||
* effect of LZMA_FINISH is that the amount of input must not
|
||||
* be changed just like in the encoder.
|
||||
*/
|
||||
} lzma_action;
|
||||
|
||||
@@ -201,8 +326,11 @@ typedef enum {
|
||||
* \brief Custom functions for memory handling
|
||||
*
|
||||
* A pointer to lzma_allocator may be passed via lzma_stream structure
|
||||
* to liblzma. The library will use these functions for memory handling
|
||||
* instead of the default malloc() and free().
|
||||
* to liblzma, and some advanced functions take a pointer to lzma_allocator
|
||||
* as a separate function argument. The library will use the functions
|
||||
* specified in lzma_allocator for memory handling instead of the default
|
||||
* malloc() and free(). C++ users should note that the custom memory
|
||||
* handling functions must not throw exceptions.
|
||||
*
|
||||
* liblzma doesn't make an internal copy of lzma_allocator. Thus, it is
|
||||
* OK to change these function pointers in the middle of the coding
|
||||
@@ -212,50 +340,54 @@ typedef enum {
|
||||
*/
|
||||
typedef struct {
|
||||
/**
|
||||
* \brief Pointer to custom memory allocation function
|
||||
*
|
||||
* Set this to point to your custom memory allocation function.
|
||||
* It can be useful for example if you want to limit how much
|
||||
* memory liblzma is allowed to use: for this, you may use
|
||||
* a pointer to lzma_memory_alloc().
|
||||
* \brief Pointer to a custom memory allocation function
|
||||
*
|
||||
* If you don't want a custom allocator, but still want
|
||||
* custom free(), set this to NULL and liblzma will use
|
||||
* the standard malloc().
|
||||
*
|
||||
* \param opaque lzma_allocator.opaque (see below)
|
||||
* \param nmemb Number of elements like in calloc().
|
||||
* liblzma will always set nmemb to 1.
|
||||
* This argument exists only for
|
||||
* \param nmemb Number of elements like in calloc(). liblzma
|
||||
* will always set nmemb to 1, so it is safe to
|
||||
* ignore nmemb in a custom allocator if you like.
|
||||
* The nmemb argument exists only for
|
||||
* compatibility with zlib and libbzip2.
|
||||
* \param size Size of an element in bytes.
|
||||
* liblzma never sets this to zero.
|
||||
*
|
||||
* \return Pointer to the beginning of a memory block of
|
||||
* size nmemb * size, or NULL if allocation fails
|
||||
* `size' bytes, or NULL if allocation fails
|
||||
* for some reason. When allocation fails, functions
|
||||
* of liblzma return LZMA_MEM_ERROR.
|
||||
*
|
||||
* The allocator should not waste time zeroing the allocated buffers.
|
||||
* This is not only about speed, but also memory usage, since the
|
||||
* operating system kernel doesn't necessarily allocate the requested
|
||||
* memory in physical memory until it is actually used. With small
|
||||
* input files, liblzma may actually need only a fraction of the
|
||||
* memory that it requested for allocation.
|
||||
*
|
||||
* \note LZMA_MEM_ERROR is also used when the size of the
|
||||
* allocation would be greater than SIZE_MAX. Thus,
|
||||
* don't assume that the custom allocator must have
|
||||
* returned NULL if some function from liblzma
|
||||
* returns LZMA_MEM_ERROR.
|
||||
*/
|
||||
void *(*alloc)(void *opaque, size_t nmemb, size_t size);
|
||||
void *(LZMA_API_CALL *alloc)(void *opaque, size_t nmemb, size_t size);
|
||||
|
||||
/**
|
||||
* \brief Pointer to custom memory freeing function
|
||||
*
|
||||
* Set this to point to your custom memory freeing function.
|
||||
* If lzma_memory_alloc() is used as allocator, this should
|
||||
* be set to lzma_memory_free().
|
||||
* \brief Pointer to a custom memory freeing function
|
||||
*
|
||||
* If you don't want a custom freeing function, but still
|
||||
* want a custom allocator, set this to NULL and liblzma
|
||||
* will use the standard free().
|
||||
*
|
||||
* \param opaque lzma_allocator.opaque (see below)
|
||||
* \param ptr Pointer returned by
|
||||
* lzma_allocator.alloc(), or when it
|
||||
* is set to NULL, a pointer returned
|
||||
* \param ptr Pointer returned by lzma_allocator.alloc(),
|
||||
* or when it is set to NULL, a pointer returned
|
||||
* by the standard malloc().
|
||||
*/
|
||||
void (*free)(void *opaque, void *ptr);
|
||||
void (LZMA_API_CALL *free)(void *opaque, void *ptr);
|
||||
|
||||
/**
|
||||
* \brief Pointer passed to .alloc() and .free()
|
||||
@@ -264,11 +396,7 @@ typedef struct {
|
||||
* and lzma_allocator.free(). This intended to ease implementing
|
||||
* custom memory allocation functions for use with liblzma.
|
||||
*
|
||||
* When using lzma_memory_alloc() and lzma_memory_free(), opaque
|
||||
* must point to lzma_memory_limitter structure allocated and
|
||||
* initialized with lzma_memory_limitter_create().
|
||||
*
|
||||
* If you don't need this, you should set it to NULL.
|
||||
* If you don't need this, you should set this to NULL.
|
||||
*/
|
||||
void *opaque;
|
||||
|
||||
@@ -287,35 +415,43 @@ typedef struct lzma_internal_s lzma_internal;
|
||||
* \brief Passing data to and from liblzma
|
||||
*
|
||||
* The lzma_stream structure is used for
|
||||
* - passing pointers to input and output buffers to liblzma;
|
||||
* - defining custom memory hander functions; and
|
||||
* - holding a pointer to coder-specific internal data structures.
|
||||
* - passing pointers to input and output buffers to liblzma;
|
||||
* - defining custom memory hander functions; and
|
||||
* - holding a pointer to coder-specific internal data structures.
|
||||
*
|
||||
* Before calling any of the lzma_*_init() functions the first time,
|
||||
* the application must reset lzma_stream to LZMA_STREAM_INIT. The
|
||||
* lzma_*_init() function will verify the options, allocate internal
|
||||
* data structures and store pointer to them into `internal'. Finally
|
||||
* total_in and total_out are reset to zero. In contrast to zlib,
|
||||
* next_in and avail_in are ignored by the initialization functions.
|
||||
* Typical usage:
|
||||
*
|
||||
* The actual coding is done with the lzma_code() function. Application
|
||||
* must update next_in, avail_in, next_out, and avail_out between
|
||||
* calls to lzma_decode() just like with zlib.
|
||||
* - After allocating lzma_stream (on stack or with malloc()), it must be
|
||||
* initialized to LZMA_STREAM_INIT (see LZMA_STREAM_INIT for details).
|
||||
*
|
||||
* In contrast to zlib, even the decoder requires that there always
|
||||
* is at least one byte space in next_out; if avail_out == 0,
|
||||
* LZMA_BUF_ERROR is returned immediatelly. This shouldn't be a problem
|
||||
* for most applications that already use zlib, but it's still worth
|
||||
* checking your application.
|
||||
* - Initialize a coder to the lzma_stream, for example by using
|
||||
* lzma_easy_encoder() or lzma_auto_decoder(). Some notes:
|
||||
* - In contrast to zlib, strm->next_in and strm->next_out are
|
||||
* ignored by all initialization functions, thus it is safe
|
||||
* to not initialize them yet.
|
||||
* - The initialization functions always set strm->total_in and
|
||||
* strm->total_out to zero.
|
||||
* - If the initialization function fails, no memory is left allocated
|
||||
* that would require freeing with lzma_end() even if some memory was
|
||||
* associated with the lzma_stream structure when the initialization
|
||||
* function was called.
|
||||
*
|
||||
* Application may modify values of total_in and total_out as it wants.
|
||||
* - Use lzma_code() to do the actual work.
|
||||
*
|
||||
* - Once the coding has been finished, the existing lzma_stream can be
|
||||
* reused. It is OK to reuse lzma_stream with different initialization
|
||||
* function without calling lzma_end() first. Old allocations are
|
||||
* automatically freed.
|
||||
*
|
||||
* - Finally, use lzma_end() to free the allocated memory. lzma_end() never
|
||||
* frees the lzma_stream structure itself.
|
||||
*
|
||||
* Application may modify the values of total_in and total_out as it wants.
|
||||
* They are updated by liblzma to match the amount of data read and
|
||||
* written, but liblzma doesn't use the values internally.
|
||||
*
|
||||
* Application must not touch the `internal' pointer.
|
||||
* written, but aren't used for anything else.
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t *next_in; /**< Pointer to the next input byte. */
|
||||
const uint8_t *next_in; /**< Pointer to the next input byte. */
|
||||
size_t avail_in; /**< Number of available input bytes in next_in. */
|
||||
uint64_t total_in; /**< Total number of bytes read by liblzma. */
|
||||
|
||||
@@ -324,87 +460,142 @@ typedef struct {
|
||||
uint64_t total_out; /**< Total number of bytes written by liblzma. */
|
||||
|
||||
/**
|
||||
* Custom memory allocation functions. Set to NULL to use
|
||||
* \brief Custom memory allocation functions
|
||||
*
|
||||
* In most cases this is NULL which makes liblzma use
|
||||
* the standard malloc() and free().
|
||||
*/
|
||||
lzma_allocator *allocator;
|
||||
|
||||
/** Internal state is not visible to outsiders. */
|
||||
/** Internal state is not visible to applications. */
|
||||
lzma_internal *internal;
|
||||
|
||||
/*
|
||||
* Reserved space to allow possible future extensions without
|
||||
* breaking the ABI. Excluding the initialization of this structure,
|
||||
* you should not touch these, because the names of these variables
|
||||
* may change.
|
||||
*/
|
||||
void *reserved_ptr1;
|
||||
void *reserved_ptr2;
|
||||
void *reserved_ptr3;
|
||||
void *reserved_ptr4;
|
||||
uint64_t reserved_int1;
|
||||
uint64_t reserved_int2;
|
||||
size_t reserved_int3;
|
||||
size_t reserved_int4;
|
||||
lzma_reserved_enum reserved_enum1;
|
||||
lzma_reserved_enum reserved_enum2;
|
||||
|
||||
} lzma_stream;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Initialization for lzma_stream
|
||||
*
|
||||
* When you declare an instance of lzma_stream, you can immediatelly
|
||||
* When you declare an instance of lzma_stream, you can immediately
|
||||
* initialize it so that initialization functions know that no memory
|
||||
* has been allocated yet:
|
||||
*
|
||||
* lzma_stream strm = LZMA_STREAM_INIT;
|
||||
*
|
||||
* If you need to initialize a dynamically allocated lzma_stream, you can use
|
||||
* memset(strm_pointer, 0, sizeof(lzma_stream)). Strictly speaking, this
|
||||
* violates the C standard since NULL may have different internal
|
||||
* representation than zero, but it should be portable enough in practice.
|
||||
* Anyway, for maximum portability, you can use something like this:
|
||||
*
|
||||
* lzma_stream tmp = LZMA_STREAM_INIT;
|
||||
* *strm = tmp;
|
||||
*/
|
||||
#define LZMA_STREAM_INIT { NULL, 0, 0, NULL, 0, 0, NULL, NULL }
|
||||
#define LZMA_STREAM_INIT \
|
||||
{ NULL, 0, 0, NULL, 0, 0, NULL, NULL, \
|
||||
NULL, NULL, NULL, NULL, 0, 0, 0, 0, \
|
||||
LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM }
|
||||
|
||||
|
||||
/**
|
||||
* \brief Initialization for lzma_stream
|
||||
*
|
||||
* This is like LZMA_STREAM_INIT, but this can be used when the lzma_stream
|
||||
* has already been allocated:
|
||||
*
|
||||
* lzma_stream *strm = malloc(sizeof(lzma_stream));
|
||||
* if (strm == NULL)
|
||||
* return LZMA_MEM_ERROR;
|
||||
* *strm = LZMA_STREAM_INIT_VAR;
|
||||
*/
|
||||
extern const lzma_stream LZMA_STREAM_INIT_VAR;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Encodes or decodes data
|
||||
* \brief Encode or decode data
|
||||
*
|
||||
* Once the lzma_stream has been successfully initialized (e.g. with
|
||||
* lzma_stream_encoder_single()), the actual encoding or decoding is
|
||||
* done using this function.
|
||||
* lzma_stream_encoder()), the actual encoding or decoding is done
|
||||
* using this function. The application has to update strm->next_in,
|
||||
* strm->avail_in, strm->next_out, and strm->avail_out to pass input
|
||||
* to and get output from liblzma.
|
||||
*
|
||||
* \return Some coders may have more exact meaning for different return
|
||||
* values, which are mentioned separately in the description of
|
||||
* the initialization functions. Here are the typical meanings:
|
||||
* - LZMA_OK: So far all good.
|
||||
* - LZMA_STREAM_END:
|
||||
* - Encoder: LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or
|
||||
* LZMA_FINISH completed.
|
||||
* - Decoder: End of uncompressed data was reached.
|
||||
* - LZMA_BUF_ERROR: Unable to progress. Provide more input or
|
||||
* output space, and call this function again. This cannot
|
||||
* occur if both avail_in and avail_out were non-zero (or
|
||||
* there's a bug in liblzma).
|
||||
* - LZMA_MEM_ERROR: Unable to allocate memory. Due to lazy
|
||||
* programming, the coding cannot continue even if the
|
||||
* application could free more memory. The next call must
|
||||
* be lzma_end() or some initialization function.
|
||||
* - LZMA_DATA_ERROR:
|
||||
* - Encoder: Filter(s) cannot process the given data.
|
||||
* - Decoder: Compressed data is corrupt.
|
||||
* - LZMA_HEADER_ERROR: Unsupported options. Rebuilding liblzma
|
||||
* with more features enabled or upgrading to a newer version
|
||||
* may help, although usually this is a sign of invalid options
|
||||
* (encoder) or corrupted input data (decoder).
|
||||
* - LZMA_PROG_ERROR: Invalid arguments or the internal state
|
||||
* of the coder is corrupt.
|
||||
* See the description of the coder-specific initialization function to find
|
||||
* out what `action' values are supported by the coder.
|
||||
*/
|
||||
extern lzma_ret lzma_code(lzma_stream *strm, lzma_action action);
|
||||
extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Frees memory allocated for the coder data structures
|
||||
* \brief Free memory allocated for the coder data structures
|
||||
*
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
*
|
||||
* After lzma_end(strm), strm->internal is guaranteed to be NULL. No other
|
||||
* members of the lzma_stream structure are touched.
|
||||
*
|
||||
* \note zlib indicates an error if application end()s unfinished
|
||||
* stream. liblzma doesn't do this, and assumes that
|
||||
* stream structure. liblzma doesn't do this, and assumes that
|
||||
* application knows what it is doing.
|
||||
*/
|
||||
extern void lzma_end(lzma_stream *strm);
|
||||
extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Get the memory usage of decoder filter chain
|
||||
*
|
||||
* This function is currently supported only when *strm has been initialized
|
||||
* with a function that takes a memlimit argument. With other functions, you
|
||||
* should use e.g. lzma_raw_encoder_memusage() or lzma_raw_decoder_memusage()
|
||||
* to estimate the memory requirements.
|
||||
*
|
||||
* This function is useful e.g. after LZMA_MEMLIMIT_ERROR to find out how big
|
||||
* the memory usage limit should have been to decode the input. Note that
|
||||
* this may give misleading information if decoding .xz Streams that have
|
||||
* multiple Blocks, because each Block can have different memory requirements.
|
||||
*
|
||||
* \return How much memory is currently allocated for the filter
|
||||
* decoders. If no filter chain is currently allocated,
|
||||
* some non-zero value is still returned, which is less than
|
||||
* or equal to what any filter chain would indicate as its
|
||||
* memory requirement.
|
||||
*
|
||||
* If this function isn't supported by *strm or some other error
|
||||
* occurs, zero is returned.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_memusage(const lzma_stream *strm)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Get the current memory usage limit
|
||||
*
|
||||
* This function is supported only when *strm has been initialized with
|
||||
* a function that takes a memlimit argument.
|
||||
*
|
||||
* \return On success, the current memory usage limit is returned
|
||||
* (always non-zero). On error, zero is returned.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_memlimit_get(const lzma_stream *strm)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Set the memory usage limit
|
||||
*
|
||||
* This function is supported only when *strm has been initialized with
|
||||
* a function that takes a memlimit argument.
|
||||
*
|
||||
* \return - LZMA_OK: New memory usage limit successfully set.
|
||||
* - LZMA_MEMLIMIT_ERROR: The new limit is too small.
|
||||
* The limit was not changed.
|
||||
* - LZMA_PROG_ERROR: Invalid arguments, e.g. *strm doesn't
|
||||
* support memory usage limit or memlimit was zero.
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_memlimit_set(
|
||||
lzma_stream *strm, uint64_t memlimit) lzma_nothrow;
|
||||
|
||||
90
src/liblzma/api/lzma/bcj.h
Normal file
90
src/liblzma/api/lzma/bcj.h
Normal file
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* \file lzma/bcj.h
|
||||
* \brief Branch/Call/Jump conversion filters
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
# error Never include this file directly. Use <lzma.h> instead.
|
||||
#endif
|
||||
|
||||
|
||||
/* Filter IDs for lzma_filter.id */
|
||||
|
||||
#define LZMA_FILTER_X86 LZMA_VLI_C(0x04)
|
||||
/**<
|
||||
* Filter for x86 binaries
|
||||
*/
|
||||
|
||||
#define LZMA_FILTER_POWERPC LZMA_VLI_C(0x05)
|
||||
/**<
|
||||
* Filter for Big endian PowerPC binaries
|
||||
*/
|
||||
|
||||
#define LZMA_FILTER_IA64 LZMA_VLI_C(0x06)
|
||||
/**<
|
||||
* Filter for IA-64 (Itanium) binaries.
|
||||
*/
|
||||
|
||||
#define LZMA_FILTER_ARM LZMA_VLI_C(0x07)
|
||||
/**<
|
||||
* Filter for ARM binaries.
|
||||
*/
|
||||
|
||||
#define LZMA_FILTER_ARMTHUMB LZMA_VLI_C(0x08)
|
||||
/**<
|
||||
* Filter for ARM-Thumb binaries.
|
||||
*/
|
||||
|
||||
#define LZMA_FILTER_SPARC LZMA_VLI_C(0x09)
|
||||
/**<
|
||||
* Filter for SPARC binaries.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \brief Options for BCJ filters
|
||||
*
|
||||
* The BCJ filters never change the size of the data. Specifying options
|
||||
* for them is optional: if pointer to options is NULL, default value is
|
||||
* used. You probably never need to specify options to BCJ filters, so just
|
||||
* set the options pointer to NULL and be happy.
|
||||
*
|
||||
* If options with non-default values have been specified when encoding,
|
||||
* the same options must also be specified when decoding.
|
||||
*
|
||||
* \note At the moment, none of the BCJ filters support
|
||||
* LZMA_SYNC_FLUSH. If LZMA_SYNC_FLUSH is specified,
|
||||
* LZMA_OPTIONS_ERROR will be returned. If there is need,
|
||||
* partial support for LZMA_SYNC_FLUSH can be added in future.
|
||||
* Partial means that flushing would be possible only at
|
||||
* offsets that are multiple of 2, 4, or 16 depending on
|
||||
* the filter, except x86 which cannot be made to support
|
||||
* LZMA_SYNC_FLUSH predictably.
|
||||
*/
|
||||
typedef struct {
|
||||
/**
|
||||
* \brief Start offset for conversions
|
||||
*
|
||||
* This setting is useful only when the same filter is used
|
||||
* _separately_ for multiple sections of the same executable file,
|
||||
* and the sections contain cross-section branch/call/jump
|
||||
* instructions. In that case it is beneficial to set the start
|
||||
* offset of the non-first sections so that the relative addresses
|
||||
* of the cross-section branch/call/jump instructions will use the
|
||||
* same absolute addresses as in the first section.
|
||||
*
|
||||
* When the pointer to options is NULL, the default value (zero)
|
||||
* is used.
|
||||
*/
|
||||
uint32_t start_offset;
|
||||
|
||||
} lzma_options_bcj;
|
||||
@@ -1,19 +1,15 @@
|
||||
/**
|
||||
* \file lzma/block.h
|
||||
* \brief .lzma Block handling
|
||||
* \brief .xz Block handling
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* \author Copyright (C) 1999-2006 Igor Pavlov
|
||||
* \author Copyright (C) 2007 Lasse Collin
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
@@ -22,388 +18,513 @@
|
||||
|
||||
|
||||
/**
|
||||
* \brief Options for the Block Header encoder and decoder
|
||||
* \brief Options for the Block and Block Header encoders and decoders
|
||||
*
|
||||
* Different things use different parts of this structure. Some read
|
||||
* some members, other functions write, and some do both. Only the
|
||||
* Different Block handling functions use different parts of this structure.
|
||||
* Some read some members, other functions write, and some do both. Only the
|
||||
* members listed for reading need to be initialized when the specified
|
||||
* functions are called. The members marked for writing will be assigned
|
||||
* new values at some point either by calling the given function or by
|
||||
* later calls to lzma_code().
|
||||
*/
|
||||
typedef struct {
|
||||
/**
|
||||
* \brief Block format version
|
||||
*
|
||||
* To prevent API and ABI breakages if new features are needed in
|
||||
* the Block field, a version number is used to indicate which
|
||||
* fields in this structure are in use. For now, version must always
|
||||
* be zero. With non-zero version, most Block related functions will
|
||||
* return LZMA_OPTIONS_ERROR.
|
||||
*
|
||||
* Read by:
|
||||
* - All functions that take pointer to lzma_block as argument,
|
||||
* including lzma_block_header_decode().
|
||||
*
|
||||
* Written by:
|
||||
* - lzma_block_header_decode()
|
||||
*/
|
||||
uint32_t version;
|
||||
|
||||
/**
|
||||
* \brief Size of the Block Header field
|
||||
*
|
||||
* This is always a multiple of four.
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_header_encode()
|
||||
* - lzma_block_header_decode()
|
||||
* - lzma_block_compressed_size()
|
||||
* - lzma_block_unpadded_size()
|
||||
* - lzma_block_total_size()
|
||||
* - lzma_block_decoder()
|
||||
* - lzma_block_buffer_decode()
|
||||
*
|
||||
* Written by:
|
||||
* - lzma_block_header_size()
|
||||
* - lzma_block_buffer_encode()
|
||||
*/
|
||||
uint32_t header_size;
|
||||
# define LZMA_BLOCK_HEADER_SIZE_MIN 8
|
||||
# define LZMA_BLOCK_HEADER_SIZE_MAX 1024
|
||||
|
||||
/**
|
||||
* \brief Type of integrity Check
|
||||
*
|
||||
* The type of the integrity Check is not stored into the Block
|
||||
* Header, thus its value must be provided also when decoding.
|
||||
* The Check ID is not stored into the Block Header, thus its value
|
||||
* must be provided also when decoding.
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_header_encode()
|
||||
* - lzma_block_header_decode()
|
||||
* - lzma_block_compressed_size()
|
||||
* - lzma_block_unpadded_size()
|
||||
* - lzma_block_total_size()
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
* - lzma_block_buffer_encode()
|
||||
* - lzma_block_buffer_decode()
|
||||
*/
|
||||
lzma_check_type check;
|
||||
|
||||
/**
|
||||
* \brief Precense of CRC32 of the Block Header
|
||||
*
|
||||
* Set this to true if CRC32 of the Block Header should be
|
||||
* calculated and stored in the Block Header.
|
||||
*
|
||||
* There is no way to autodetect if CRC32 is present in the Block
|
||||
* Header, thus this information must be provided also when decoding.
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_header_size()
|
||||
* - lzma_block_header_encoder()
|
||||
* - lzma_block_header_decoder()
|
||||
*/
|
||||
lzma_bool has_crc32;
|
||||
|
||||
/**
|
||||
* \brief Usage of End of Payload Marker
|
||||
*
|
||||
* If this is true, End of Payload Marker is used even if
|
||||
* Uncompressed Size is known.
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_header_encoder()
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
*
|
||||
* Written by:
|
||||
* - lzma_block_header_decoder()
|
||||
*/
|
||||
lzma_bool has_eopm;
|
||||
|
||||
/**
|
||||
* \brief True if the Block is a Metadata Block
|
||||
*
|
||||
* If this is true, the Metadata bit will be set in the Block Header.
|
||||
* It is up to the application to store correctly formatted data
|
||||
* into Metadata Block.
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_header_encoder()
|
||||
*
|
||||
* Written by:
|
||||
* - lzma_block_header_decoder()
|
||||
*/
|
||||
lzma_bool is_metadata;
|
||||
|
||||
/**
|
||||
* \brief True if Uncompressed Size is in Block Footer
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
*/
|
||||
lzma_bool has_uncompressed_size_in_footer;
|
||||
|
||||
/**
|
||||
* \brief True if Backward Size is in Block Footer
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
*/
|
||||
lzma_bool has_backward_size;
|
||||
|
||||
/**
|
||||
* \brief True if Block coder should take care of Padding
|
||||
*
|
||||
* In liblzma, Stream decoder sets this to true when decoding
|
||||
* Header Metadata Block or Data Blocks from Multi-Block Stream,
|
||||
* and to false when decoding Single-Block Stream or Footer
|
||||
* Metadata Block from a Multi-Block Stream.
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
*/
|
||||
lzma_bool handle_padding;
|
||||
lzma_check check;
|
||||
|
||||
/**
|
||||
* \brief Size of the Compressed Data in bytes
|
||||
*
|
||||
* Usually you don't know this value when encoding in streamed mode.
|
||||
* In non-streamed mode you can reserve space for this field when
|
||||
* encoding the Block Header the first time, and then re-encode the
|
||||
* Block Header and copy it over the original one after the encoding
|
||||
* of the Block has been finished.
|
||||
* Encoding: If this is not LZMA_VLI_UNKNOWN, Block Header encoder
|
||||
* will store this value to the Block Header. Block encoder doesn't
|
||||
* care about this value, but will set it once the encoding has been
|
||||
* finished.
|
||||
*
|
||||
* Decoding: If this is not LZMA_VLI_UNKNOWN, Block decoder will
|
||||
* verify that the size of the Compressed Data field matches
|
||||
* compressed_size.
|
||||
*
|
||||
* Usually you don't know this value when encoding in streamed mode,
|
||||
* and thus cannot write this field into the Block Header.
|
||||
*
|
||||
* In non-streamed mode you can reserve space for this field before
|
||||
* encoding the actual Block. After encoding the data, finish the
|
||||
* Block by encoding the Block Header. Steps in detail:
|
||||
*
|
||||
* - Set compressed_size to some big enough value. If you don't know
|
||||
* better, use LZMA_VLI_MAX, but remember that bigger values take
|
||||
* more space in Block Header.
|
||||
*
|
||||
* - Call lzma_block_header_size() to see how much space you need to
|
||||
* reserve for the Block Header.
|
||||
*
|
||||
* - Encode the Block using lzma_block_encoder() and lzma_code().
|
||||
* It sets compressed_size to the correct value.
|
||||
*
|
||||
* - Use lzma_block_header_encode() to encode the Block Header.
|
||||
* Because space was reserved in the first step, you don't need
|
||||
* to call lzma_block_header_size() anymore, because due to
|
||||
* reserving, header_size has to be big enough. If it is "too big",
|
||||
* lzma_block_header_encode() will add enough Header Padding to
|
||||
* make Block Header to match the size specified by header_size.
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_header_size()
|
||||
* - lzma_block_header_encoder()
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_header_encode()
|
||||
* - lzma_block_compressed_size()
|
||||
* - lzma_block_unpadded_size()
|
||||
* - lzma_block_total_size()
|
||||
* - lzma_block_decoder()
|
||||
* - lzma_block_buffer_decode()
|
||||
*
|
||||
* Written by:
|
||||
* - lzma_block_header_decoder()
|
||||
* - lzma_block_header_decode()
|
||||
* - lzma_block_compressed_size()
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
* - lzma_block_buffer_encode()
|
||||
* - lzma_block_buffer_decode()
|
||||
*/
|
||||
lzma_vli compressed_size;
|
||||
|
||||
/**
|
||||
* \brief Uncompressed Size in bytes
|
||||
*
|
||||
* Encoder: If this value is not LZMA_VLI_VALUE_UNKNOWN, it is stored
|
||||
* to the Uncompressed Size field in the Block Header. The real
|
||||
* uncompressed size of the data being compressed must match
|
||||
* the Uncompressed Size or LZMA_HEADER_ERROR is returned.
|
||||
* This is handled very similarly to compressed_size above.
|
||||
*
|
||||
* If Uncompressed Size is unknown, End of Payload Marker must
|
||||
* be used. If uncompressed_size == LZMA_VLI_VALUE_UNKNOWN and
|
||||
* has_eopm == 0, LZMA_HEADER_ERROR will be returned.
|
||||
*
|
||||
* Decoder: If this value is not LZMA_VLI_VALUE_UNKNOWN, it is
|
||||
* compared to the real Uncompressed Size. If they do not match,
|
||||
* LZMA_HEADER_ERROR is returned.
|
||||
* uncompressed_size is needed by fewer functions than
|
||||
* compressed_size. This is because uncompressed_size isn't
|
||||
* needed to validate that Block stays within proper limits.
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_header_size()
|
||||
* - lzma_block_header_encoder()
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_header_encode()
|
||||
* - lzma_block_decoder()
|
||||
* - lzma_block_buffer_decode()
|
||||
*
|
||||
* Written by:
|
||||
* - lzma_block_header_decoder()
|
||||
* - lzma_block_header_decode()
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
* - lzma_block_buffer_encode()
|
||||
* - lzma_block_buffer_decode()
|
||||
*/
|
||||
lzma_vli uncompressed_size;
|
||||
|
||||
/**
|
||||
* \brief Number of bytes to reserve for Compressed Size
|
||||
*
|
||||
* This is useful if you want to be able to store the Compressed Size
|
||||
* to the Block Header, but you don't know it when starting to encode.
|
||||
* Setting this to non-zero value at maximum of LZMA_VLI_BYTES_MAX,
|
||||
* the Block Header encoder will force the Compressed Size field to
|
||||
* occupy specified number of bytes. You can later rewrite the Block
|
||||
* Header to contain correct information by using otherwise identical
|
||||
* lzma_options_block structure except the correct compressed_size.
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_header_size()
|
||||
* - lzma_block_header_encoder()
|
||||
*
|
||||
* Written by:
|
||||
* - lzma_block_header_decoder()
|
||||
*/
|
||||
uint32_t compressed_reserve;
|
||||
|
||||
/**
|
||||
* \brief Number of bytes to reserve for Uncompressed Size
|
||||
*
|
||||
* See the description of compressed_size above.
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_header_size()
|
||||
* - lzma_block_header_encoder()
|
||||
*
|
||||
* Written by:
|
||||
* - lzma_block_header_decoder()
|
||||
*/
|
||||
uint32_t uncompressed_reserve;
|
||||
|
||||
/**
|
||||
* \brief Total Size of the Block in bytes
|
||||
*
|
||||
* This is useful in the decoder, which can verify the Total Size
|
||||
* if it is known from Index.
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
*
|
||||
* Written by:
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
*/
|
||||
lzma_vli total_size;
|
||||
|
||||
/**
|
||||
* \brief Upper limit of Total Size
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
*/
|
||||
lzma_vli total_limit;
|
||||
|
||||
/**
|
||||
* \brief Upper limit of Uncompressed Size
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
*/
|
||||
lzma_vli uncompressed_limit;
|
||||
|
||||
/**
|
||||
* \brief Array of filters
|
||||
*
|
||||
* There can be at maximum of seven filters. The end of the array
|
||||
* is marked with .id = LZMA_VLI_VALUE_UNKNOWN. Minimum number of
|
||||
* filters is zero; in that case, an implicit Copy filter is used.
|
||||
* There can be 1-4 filters. The end of the array is marked with
|
||||
* .id = LZMA_VLI_UNKNOWN.
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_header_size()
|
||||
* - lzma_block_header_encoder()
|
||||
* - lzma_block_header_encode()
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
* - lzma_block_buffer_encode()
|
||||
* - lzma_block_buffer_decode()
|
||||
*
|
||||
* Written by:
|
||||
* - lzma_block_header_decoder(): Note that this does NOT free()
|
||||
* the old filter options structures. If decoding fails, the
|
||||
* caller must take care of freeing the options structures
|
||||
* that may have been allocated and decoded before the error
|
||||
* occurred.
|
||||
* - lzma_block_header_decode(): Note that this does NOT free()
|
||||
* the old filter options structures. All unused filters[] will
|
||||
* have .id == LZMA_VLI_UNKNOWN and .options == NULL. If
|
||||
* decoding fails, all filters[] are guaranteed to be
|
||||
* LZMA_VLI_UNKNOWN and NULL.
|
||||
*
|
||||
* \note Because of the array is terminated with
|
||||
* .id = LZMA_VLI_UNKNOWN, the actual array must
|
||||
* have LZMA_FILTERS_MAX + 1 members or the Block
|
||||
* Header decoder will overflow the buffer.
|
||||
*/
|
||||
lzma_options_filter filters[8];
|
||||
lzma_filter *filters;
|
||||
|
||||
/**
|
||||
* \brief Size of the Padding field
|
||||
* \brief Raw value stored in the Check field
|
||||
*
|
||||
* The Padding field exist to allow aligning the Compressed Data field
|
||||
* optimally in the Block. See lzma_options_stream.alignment in
|
||||
* stream.h for more information.
|
||||
* After successful coding, the first lzma_check_size(check) bytes
|
||||
* of this array contain the raw value stored in the Check field.
|
||||
*
|
||||
* If you want the Block Header encoder to automatically calculate
|
||||
* optimal size for the Padding field by looking at the information
|
||||
* in filters[], set this to LZMA_BLOCK_HEADER_PADDING_AUTO. In that
|
||||
* case, you must also set the aligmnet variable to tell the the
|
||||
* encoder the aligmnet of the beginning of the Block Header.
|
||||
* Note that CRC32 and CRC64 are stored in little endian byte order.
|
||||
* Take it into account if you display the Check values to the user.
|
||||
*
|
||||
* The decoder never sets this to LZMA_BLOCK_HEADER_PADDING_AUTO.
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_header_size()
|
||||
* - lzma_block_header_encoder(): Note that this doesn't
|
||||
* accept LZMA_BLOCK_HEADER_PADDING_AUTO.
|
||||
*
|
||||
* Written by (these never set padding to
|
||||
* LZMA_BLOCK_HEADER_PADDING_AUTO):
|
||||
* - lzma_block_header_size()
|
||||
* - lzma_block_header_decoder()
|
||||
*/
|
||||
int32_t padding;
|
||||
# define LZMA_BLOCK_HEADER_PADDING_AUTO (-1)
|
||||
# define LZMA_BLOCK_HEADER_PADDING_MIN 0
|
||||
# define LZMA_BLOCK_HEADER_PADDING_MAX 31
|
||||
|
||||
/**
|
||||
* \brief Alignment of the beginning of the Block Header
|
||||
*
|
||||
* This variable is read only if padding has been set to
|
||||
* LZMA_BLOCK_HEADER_PADDING_AUTO.
|
||||
*
|
||||
* Read by:
|
||||
* - lzma_block_header_size()
|
||||
* - lzma_block_header_encoder()
|
||||
*/
|
||||
uint32_t alignment;
|
||||
|
||||
/**
|
||||
* \brief Size of the Block Header
|
||||
*
|
||||
* Read by:
|
||||
* Written by:
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
*
|
||||
* Written by:
|
||||
* - lzma_block_header_size()
|
||||
* - lzma_block_header_decoder()
|
||||
* - lzma_block_buffer_encode()
|
||||
* - lzma_block_buffer_decode()
|
||||
*/
|
||||
uint32_t header_size;
|
||||
uint8_t raw_check[LZMA_CHECK_SIZE_MAX];
|
||||
|
||||
} lzma_options_block;
|
||||
/*
|
||||
* Reserved space to allow possible future extensions without
|
||||
* breaking the ABI. You should not touch these, because the names
|
||||
* of these variables may change. These are and will never be used
|
||||
* with the currently supported options, so it is safe to leave these
|
||||
* uninitialized.
|
||||
*/
|
||||
void *reserved_ptr1;
|
||||
void *reserved_ptr2;
|
||||
void *reserved_ptr3;
|
||||
uint32_t reserved_int1;
|
||||
uint32_t reserved_int2;
|
||||
lzma_vli reserved_int3;
|
||||
lzma_vli reserved_int4;
|
||||
lzma_vli reserved_int5;
|
||||
lzma_vli reserved_int6;
|
||||
lzma_vli reserved_int7;
|
||||
lzma_vli reserved_int8;
|
||||
lzma_reserved_enum reserved_enum1;
|
||||
lzma_reserved_enum reserved_enum2;
|
||||
lzma_reserved_enum reserved_enum3;
|
||||
lzma_reserved_enum reserved_enum4;
|
||||
lzma_bool reserved_bool1;
|
||||
lzma_bool reserved_bool2;
|
||||
lzma_bool reserved_bool3;
|
||||
lzma_bool reserved_bool4;
|
||||
lzma_bool reserved_bool5;
|
||||
lzma_bool reserved_bool6;
|
||||
lzma_bool reserved_bool7;
|
||||
lzma_bool reserved_bool8;
|
||||
|
||||
} lzma_block;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculates the size of Header Padding and Block Header
|
||||
* \brief Decode the Block Header Size field
|
||||
*
|
||||
* To decode Block Header using lzma_block_header_decode(), the size of the
|
||||
* Block Header has to be known and stored into lzma_block.header_size.
|
||||
* The size can be calculated from the first byte of a Block using this macro.
|
||||
* Note that if the first byte is 0x00, it indicates beginning of Index; use
|
||||
* this macro only when the byte is not 0x00.
|
||||
*
|
||||
* There is no encoding macro, because Block Header encoder is enough for that.
|
||||
*/
|
||||
#define lzma_block_header_size_decode(b) (((uint32_t)(b) + 1) * 4)
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculate Block Header Size
|
||||
*
|
||||
* Calculate the minimum size needed for the Block Header field using the
|
||||
* settings specified in the lzma_block structure. Note that it is OK to
|
||||
* increase the calculated header_size value as long as it is a multiple of
|
||||
* four and doesn't exceed LZMA_BLOCK_HEADER_SIZE_MAX. Increasing header_size
|
||||
* just means that lzma_block_header_encode() will add Header Padding.
|
||||
*
|
||||
* \return - LZMA_OK: Size calculated successfully and stored to
|
||||
* options->header_size.
|
||||
* - LZMA_HEADER_ERROR: Unsupported filters or filter options.
|
||||
* - LZMA_PROG_ERROR: Invalid options
|
||||
* block->header_size.
|
||||
* - LZMA_OPTIONS_ERROR: Unsupported version, filters or
|
||||
* filter options.
|
||||
* - LZMA_PROG_ERROR: Invalid values like compressed_size == 0.
|
||||
*
|
||||
* \note This doesn't check that all the options are valid i.e. this
|
||||
* may return LZMA_OK even if lzma_block_header_encode() or
|
||||
* lzma_block_encoder() would fail.
|
||||
* lzma_block_encoder() would fail. If you want to validate the
|
||||
* filter chain, consider using lzma_memlimit_encoder() which as
|
||||
* a side-effect validates the filter chain.
|
||||
*/
|
||||
extern lzma_ret lzma_block_header_size(lzma_options_block *options);
|
||||
extern LZMA_API(lzma_ret) lzma_block_header_size(lzma_block *block)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Encodes Block Header
|
||||
* \brief Encode Block Header
|
||||
*
|
||||
* Encoding of the Block options is done with a single call instead of
|
||||
* first initializing and then doing the actual work with lzma_code().
|
||||
* The caller must have calculated the size of the Block Header already with
|
||||
* lzma_block_header_size(). If a value larger than the one calculated by
|
||||
* lzma_block_header_size() is used, the Block Header will be padded to the
|
||||
* specified size.
|
||||
*
|
||||
* \param out Beginning of the output buffer. This must be
|
||||
* at least options->header_size bytes.
|
||||
* \param options Block options to be encoded.
|
||||
* at least block->header_size bytes.
|
||||
* \param block Block options to be encoded.
|
||||
*
|
||||
* \return - LZMA_OK: Encoding was successful. options->header_size
|
||||
* \return - LZMA_OK: Encoding was successful. block->header_size
|
||||
* bytes were written to output buffer.
|
||||
* - LZMA_HEADER_ERROR: Invalid or unsupported options.
|
||||
* - LZMA_PROG_ERROR
|
||||
* - LZMA_OPTIONS_ERROR: Invalid or unsupported options.
|
||||
* - LZMA_PROG_ERROR: Invalid arguments, for example
|
||||
* block->header_size is invalid or block->filters is NULL.
|
||||
*/
|
||||
extern lzma_ret lzma_block_header_encode(
|
||||
uint8_t *out, const lzma_options_block *options);
|
||||
extern LZMA_API(lzma_ret) lzma_block_header_encode(
|
||||
const lzma_block *block, uint8_t *out)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Initializes Block Header decoder
|
||||
* \brief Decode Block Header
|
||||
*
|
||||
* Because the results of this decoder are placed into *options,
|
||||
* strm->next_in, strm->avail_in, and strm->total_in are not used.
|
||||
* block->version should be set to the highest value supported by the
|
||||
* application; currently the only possible version is zero. This function
|
||||
* will set version to the lowest value that still supports all the features
|
||||
* required by the Block Header.
|
||||
*
|
||||
* The only valid `action' with lzma_code() is LZMA_RUN.
|
||||
* The size of the Block Header must have already been decoded with
|
||||
* lzma_block_header_size_decode() macro and stored to block->header_size.
|
||||
*
|
||||
* \return - LZMA_OK: Encoding was successful. options->header_size
|
||||
* bytes were written to output buffer.
|
||||
* - LZMA_HEADER_ERROR: Invalid or unsupported options.
|
||||
* - LZMA_PROG_ERROR
|
||||
* block->filters must have been allocated, but they don't need to be
|
||||
* initialized (possible existing filter options are not freed).
|
||||
*
|
||||
* \param block Destination for Block options.
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() (and also free()
|
||||
* if an error occurs).
|
||||
* \param in Beginning of the input buffer. This must be
|
||||
* at least block->header_size bytes.
|
||||
*
|
||||
* \return - LZMA_OK: Decoding was successful. block->header_size
|
||||
* bytes were read from the input buffer.
|
||||
* - LZMA_OPTIONS_ERROR: The Block Header specifies some
|
||||
* unsupported options such as unsupported filters. This can
|
||||
* happen also if block->version was set to a too low value
|
||||
* compared to what would be required to properly represent
|
||||
* the information stored in the Block Header.
|
||||
* - LZMA_DATA_ERROR: Block Header is corrupt, for example,
|
||||
* the CRC32 doesn't match.
|
||||
* - LZMA_PROG_ERROR: Invalid arguments, for example
|
||||
* block->header_size is invalid or block->filters is NULL.
|
||||
*/
|
||||
extern lzma_ret lzma_block_header_decoder(
|
||||
lzma_stream *strm, lzma_options_block *options);
|
||||
extern LZMA_API(lzma_ret) lzma_block_header_decode(lzma_block *block,
|
||||
lzma_allocator *allocator, const uint8_t *in)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Initializes .lzma Block encoder
|
||||
* \brief Validate and set Compressed Size according to Unpadded Size
|
||||
*
|
||||
* This function is required for multi-thread encoding. It may also be
|
||||
* useful when implementing custom file formats.
|
||||
* Block Header stores Compressed Size, but Index has Unpadded Size. If the
|
||||
* application has already parsed the Index and is now decoding Blocks,
|
||||
* it can calculate Compressed Size from Unpadded Size. This function does
|
||||
* exactly that with error checking:
|
||||
*
|
||||
* - Compressed Size calculated from Unpadded Size must be positive integer,
|
||||
* that is, Unpadded Size must be big enough that after Block Header and
|
||||
* Check fields there's still at least one byte for Compressed Size.
|
||||
*
|
||||
* - If Compressed Size was present in Block Header, the new value
|
||||
* calculated from Unpadded Size is compared against the value
|
||||
* from Block Header.
|
||||
*
|
||||
* \note This function must be called _after_ decoding the Block Header
|
||||
* field so that it can properly validate Compressed Size if it
|
||||
* was present in Block Header.
|
||||
*
|
||||
* \return - LZMA_OK: block->compressed_size was set successfully.
|
||||
* - LZMA_DATA_ERROR: unpadded_size is too small compared to
|
||||
* block->header_size and lzma_check_size(block->check).
|
||||
* - LZMA_PROG_ERROR: Some values are invalid. For example,
|
||||
* block->header_size must be a multiple of four and
|
||||
* between 8 and 1024 inclusive.
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_block_compressed_size(
|
||||
lzma_block *block, lzma_vli unpadded_size)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculate Unpadded Size
|
||||
*
|
||||
* The Index field stores Unpadded Size and Uncompressed Size. The latter
|
||||
* can be taken directly from the lzma_block structure after coding a Block,
|
||||
* but Unpadded Size needs to be calculated from Block Header Size,
|
||||
* Compressed Size, and size of the Check field. This is where this function
|
||||
* is needed.
|
||||
*
|
||||
* \return Unpadded Size on success, or zero on error.
|
||||
*/
|
||||
extern LZMA_API(lzma_vli) lzma_block_unpadded_size(const lzma_block *block)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculate the total encoded size of a Block
|
||||
*
|
||||
* This is equivalent to lzma_block_unpadded_size() except that the returned
|
||||
* value includes the size of the Block Padding field.
|
||||
*
|
||||
* \return On success, total encoded size of the Block. On error,
|
||||
* zero is returned.
|
||||
*/
|
||||
extern LZMA_API(lzma_vli) lzma_block_total_size(const lzma_block *block)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Initialize .xz Block encoder
|
||||
*
|
||||
* Valid actions for lzma_code() are LZMA_RUN, LZMA_SYNC_FLUSH (only if the
|
||||
* filter chain supports it), and LZMA_FINISH.
|
||||
*
|
||||
* \return - LZMA_OK: All good, continue with lzma_code().
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_HEADER_ERROR
|
||||
* - LZMA_DATA_ERROR: Limits (total_limit and uncompressed_limit)
|
||||
* have been reached already.
|
||||
* - LZMA_UNSUPPORTED_CHECK: options->check specfies a Check
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_UNSUPPORTED_CHECK: block->check specifies a Check ID
|
||||
* that is not supported by this buid of liblzma. Initializing
|
||||
* the encoder failed.
|
||||
* - LZMA_PROG_ERROR
|
||||
*
|
||||
* lzma_code() can return FIXME
|
||||
*/
|
||||
extern lzma_ret lzma_block_encoder(
|
||||
lzma_stream *strm, lzma_options_block *options);
|
||||
extern LZMA_API(lzma_ret) lzma_block_encoder(
|
||||
lzma_stream *strm, lzma_block *block)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Initializes decoder for .lzma Block
|
||||
* \brief Initialize .xz Block decoder
|
||||
*
|
||||
* Valid actions for lzma_code() are LZMA_RUN and LZMA_FINISH. Using
|
||||
* LZMA_FINISH is not required. It is supported only for convenience.
|
||||
*
|
||||
* \return - LZMA_OK: All good, continue with lzma_code().
|
||||
* - LZMA_UNSUPPORTED_CHECK: Initialization was successful, but
|
||||
* the given Check type is not supported, thus Check will be
|
||||
* the given Check ID is not supported, thus Check will be
|
||||
* ignored.
|
||||
* - LZMA_PROG_ERROR
|
||||
* - LZMA_MEM_ERROR
|
||||
*/
|
||||
extern lzma_ret lzma_block_decoder(
|
||||
lzma_stream *strm, lzma_options_block *options);
|
||||
extern LZMA_API(lzma_ret) lzma_block_decoder(
|
||||
lzma_stream *strm, lzma_block *block)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculate maximum output size for single-call Block encoding
|
||||
*
|
||||
* This is equivalent to lzma_stream_buffer_bound() but for .xz Blocks.
|
||||
* See the documentation of lzma_stream_buffer_bound().
|
||||
*/
|
||||
extern LZMA_API(size_t) lzma_block_buffer_bound(size_t uncompressed_size)
|
||||
lzma_nothrow;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Single-call .xz Block encoder
|
||||
*
|
||||
* In contrast to the multi-call encoder initialized with
|
||||
* lzma_block_encoder(), this function encodes also the Block Header. This
|
||||
* is required to make it possible to write appropriate Block Header also
|
||||
* in case the data isn't compressible, and different filter chain has to be
|
||||
* used to encode the data in uncompressed form using uncompressed chunks
|
||||
* of the LZMA2 filter.
|
||||
*
|
||||
* When the data isn't compressible, header_size, compressed_size, and
|
||||
* uncompressed_size are set just like when the data was compressible, but
|
||||
* it is possible that header_size is too small to hold the filter chain
|
||||
* specified in block->filters, because that isn't necessarily the filter
|
||||
* chain that was actually used to encode the data. lzma_block_unpadded_size()
|
||||
* still works normally, because it doesn't read the filters array.
|
||||
*
|
||||
* \param block Block options: block->version, block->check,
|
||||
* and block->filters must have been initialized.
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
* \param in Beginning of the input buffer
|
||||
* \param in_size Size of the input buffer
|
||||
* \param out Beginning of the output buffer
|
||||
* \param out_pos The next byte will be written to out[*out_pos].
|
||||
* *out_pos is updated only if encoding succeeds.
|
||||
* \param out_size Size of the out buffer; the first byte into
|
||||
* which no data is written to is out[out_size].
|
||||
*
|
||||
* \return - LZMA_OK: Encoding was successful.
|
||||
* - LZMA_BUF_ERROR: Not enough output buffer space.
|
||||
* - LZMA_UNSUPPORTED_CHECK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_DATA_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_block_buffer_encode(
|
||||
lzma_block *block, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Single-call .xz Block decoder
|
||||
*
|
||||
* This is single-call equivalent of lzma_block_decoder(), and requires that
|
||||
* the caller has already decoded Block Header and checked its memory usage.
|
||||
*
|
||||
* \param block Block options just like with lzma_block_decoder().
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
* \param in Beginning of the input buffer
|
||||
* \param in_pos The next byte will be read from in[*in_pos].
|
||||
* *in_pos is updated only if decoding succeeds.
|
||||
* \param in_size Size of the input buffer; the first byte that
|
||||
* won't be read is in[in_size].
|
||||
* \param out Beginning of the output buffer
|
||||
* \param out_pos The next byte will be written to out[*out_pos].
|
||||
* *out_pos is updated only if encoding succeeds.
|
||||
* \param out_size Size of the out buffer; the first byte into
|
||||
* which no data is written to is out[out_size].
|
||||
*
|
||||
* \return - LZMA_OK: Decoding was successful.
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_DATA_ERROR
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_BUF_ERROR: Output buffer was too small.
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_block_buffer_decode(
|
||||
lzma_block *block, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t *in_pos, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
lzma_nothrow;
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
/**
|
||||
* \file lzma/check.h
|
||||
* \brief Integrity checks
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* \author Copyright (C) 1999-2006 Igor Pavlov
|
||||
* \author Copyright (C) 2007 Lasse Collin
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
@@ -22,11 +18,11 @@
|
||||
|
||||
|
||||
/**
|
||||
* \brief Type of the Check
|
||||
* \brief Type of the integrity check (Check ID)
|
||||
*
|
||||
* The .lzma format supports multiple types of Checks that are calculated
|
||||
* from the uncompressed data (unless it is empty; then it's calculated
|
||||
* from Block Header).
|
||||
* The .xz format supports multiple types of checks that are calculated
|
||||
* from the uncompressed data. They vary in both speed and ability to
|
||||
* detect errors.
|
||||
*/
|
||||
typedef enum {
|
||||
LZMA_CHECK_NONE = 0,
|
||||
@@ -43,86 +39,112 @@ typedef enum {
|
||||
* Size of the Check field: 4 bytes
|
||||
*/
|
||||
|
||||
LZMA_CHECK_CRC64 = 3,
|
||||
LZMA_CHECK_CRC64 = 4,
|
||||
/**<
|
||||
* CRC64 using the polynomial from the ECMA-182 standard
|
||||
*
|
||||
* Size of the Check field: 8 bytes
|
||||
*/
|
||||
|
||||
LZMA_CHECK_SHA256 = 5
|
||||
LZMA_CHECK_SHA256 = 10
|
||||
/**<
|
||||
* SHA-256
|
||||
*
|
||||
* Size of the Check field: 32 bytes
|
||||
*/
|
||||
} lzma_check_type;
|
||||
} lzma_check;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Maximum valid Check ID
|
||||
*
|
||||
* The .lzma file format specification specifies eight Check IDs (0-7). Some
|
||||
* of them are only reserved i.e. no actual Check algorithm has been assigned.
|
||||
* Still liblzma accepts any of these eight IDs for future compatibility
|
||||
* when decoding files. If a valid but unsupported Check ID is detected,
|
||||
* liblzma indicates a warning with LZMA_UNSUPPORTED_CHECK.
|
||||
*
|
||||
* FIXME bad desc
|
||||
* The .xz file format specification specifies 16 Check IDs (0-15). Some
|
||||
* of them are only reserved, that is, no actual Check algorithm has been
|
||||
* assigned. When decoding, liblzma still accepts unknown Check IDs for
|
||||
* future compatibility. If a valid but unsupported Check ID is detected,
|
||||
* liblzma can indicate a warning; see the flags LZMA_TELL_NO_CHECK,
|
||||
* LZMA_TELL_UNSUPPORTED_CHECK, and LZMA_TELL_ANY_CHECK in container.h.
|
||||
*/
|
||||
#define LZMA_CHECK_ID_MAX 7
|
||||
#define LZMA_CHECK_ID_MAX 15
|
||||
|
||||
|
||||
/**
|
||||
* \brief Check IDs supported by this liblzma build
|
||||
* \brief Test if the given Check ID is supported
|
||||
*
|
||||
* If lzma_available_checks[n] is true, the Check ID n is supported by this
|
||||
* liblzma build. You can assume that LZMA_CHECK_NONE and LZMA_CHECK_CRC32
|
||||
* are always available.
|
||||
* Return true if the given Check ID is supported by this liblzma build.
|
||||
* Otherwise false is returned. It is safe to call this with a value that
|
||||
* is not in the range [0, 15]; in that case the return value is always false.
|
||||
*
|
||||
* You can assume that LZMA_CHECK_NONE and LZMA_CHECK_CRC32 are always
|
||||
* supported (even if liblzma is built with limited features).
|
||||
*/
|
||||
extern const lzma_bool lzma_available_checks[LZMA_CHECK_ID_MAX + 1];
|
||||
extern LZMA_API(lzma_bool) lzma_check_is_supported(lzma_check check)
|
||||
lzma_nothrow lzma_attr_const;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Size of the Check field with different Check IDs
|
||||
* \brief Get the size of the Check field with the given Check ID
|
||||
*
|
||||
* Although not all Check IDs have a check algorithm associated, the size of
|
||||
* every Check is already frozen. This array contains the size (in bytes) of
|
||||
* the Check field with specified Check ID. The values are taken from the
|
||||
* section 2.2.2 of the .lzma file format specification:
|
||||
* { 0, 4, 4, 8, 16, 32, 32, 64 }
|
||||
* every Check is already frozen. This function returns the size (in bytes) of
|
||||
* the Check field with the specified Check ID. The values are:
|
||||
* { 0, 4, 4, 4, 8, 8, 8, 16, 16, 16, 32, 32, 32, 64, 64, 64 }
|
||||
*
|
||||
* If the argument is not in the range [0, 15], UINT32_MAX is returned.
|
||||
*/
|
||||
extern const uint32_t lzma_check_sizes[LZMA_CHECK_ID_MAX + 1];
|
||||
extern LZMA_API(uint32_t) lzma_check_size(lzma_check check)
|
||||
lzma_nothrow lzma_attr_const;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Maximum size of a Check field
|
||||
*/
|
||||
#define LZMA_CHECK_SIZE_MAX 64
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculate CRC32
|
||||
*
|
||||
* Calculates CRC32 using the polynomial from the IEEE 802.3 standard.
|
||||
* Calculate CRC32 using the polynomial from the IEEE 802.3 standard.
|
||||
*
|
||||
* \param buf Pointer to the input buffer
|
||||
* \param size Size of the input buffer
|
||||
* \param crc Previously returned CRC value. This is used to
|
||||
* calculate the CRC of a big buffer in smaller chunks.
|
||||
* Set to zero when there is no previous value.
|
||||
* Set to zero when starting a new calculation.
|
||||
*
|
||||
* \return Updated CRC value, which can be passed to this function
|
||||
* again to continue CRC calculation.
|
||||
*/
|
||||
extern uint32_t lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc);
|
||||
extern LZMA_API(uint32_t) lzma_crc32(
|
||||
const uint8_t *buf, size_t size, uint32_t crc)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculate CRC64
|
||||
*
|
||||
* Calculates CRC64 using the polynomial from the ECMA-182 standard.
|
||||
* Calculate CRC64 using the polynomial from the ECMA-182 standard.
|
||||
*
|
||||
* This function is used similarly to lzma_crc32(). See its documentation.
|
||||
*/
|
||||
extern uint64_t lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc);
|
||||
extern LZMA_API(uint64_t) lzma_crc64(
|
||||
const uint8_t *buf, size_t size, uint64_t crc)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
|
||||
|
||||
/*
|
||||
* SHA256 functions are currently not exported to public API.
|
||||
* Contact the author if you think it should be.
|
||||
* SHA-256 functions are currently not exported to public API.
|
||||
* Contact Lasse Collin if you think it should be.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \brief Get the type of the integrity check
|
||||
*
|
||||
* This function can be called only immediately after lzma_code() has
|
||||
* returned LZMA_NO_CHECK, LZMA_UNSUPPORTED_CHECK, or LZMA_GET_CHECK.
|
||||
* Calling this function in any other situation has undefined behavior.
|
||||
*/
|
||||
extern LZMA_API(lzma_check) lzma_get_check(const lzma_stream *strm)
|
||||
lzma_nothrow;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user