Why is unzipped file smaller than zipped fileFile was deleted and then reappeared when folder was zippedHow to zip a big folder into small files limited to 20Mb?Can a Zip File Become Damaged from Repeated Unzipping?How to delete unwanted directory paths in zipped file?How to handle duplicate files during runtimeRezip file without creating temporariesUnzip File: Permission DeniedUnable to get data from unzipped fileRecovering password from zip fileunzipping and re-zipping a file results in a different hash
"Official wife" or "Formal wife"?
Split into three!
How many wires should be in a new thermostat cable?
Why is Ni[(PPh₃)₂Cl₂] tetrahedral?
How do I write real-world stories separate from my country of origin?
Meaning of "half-crown enclosure"
What is the required burn to keep a satellite at a Lagrangian point?
Is it normal to "extract a paper" from a master thesis?
Existence of a model of ZFC in which the natural numbers are really the natural numbers
One word for 'the thing that attracts me'?
How to test if argument is a single space?
Caught with my phone during an exam
Find this Unique UVC Palindrome ( ignoring signs and decimal) from Given Fractional Relationship
Can the Conjure Barrage spell stack with the Disarming Attack or Trip Attack Battle Master maneuvers?
What does it mean for something to be strictly less than epsilon for an arbitrary epsilon?
How do you earn the reader's trust?
Why "strap-on" boosters, and how do other people say it?
How would a physicist explain this starship engine?
Why is this integration method not valid?
csname in newenviroment
Are there historical examples of audiences drawn to a work that was "so bad it's good"?
Is the default 512 byte physical sector size appropriate for SSD disks under Linux?
Why do the i8080 I/O instructions take a byte-sized operand to determine the port?
Why is 'additive' EQ more difficult to use than 'subtractive'?
Why is unzipped file smaller than zipped file
File was deleted and then reappeared when folder was zippedHow to zip a big folder into small files limited to 20Mb?Can a Zip File Become Damaged from Repeated Unzipping?How to delete unwanted directory paths in zipped file?How to handle duplicate files during runtimeRezip file without creating temporariesUnzip File: Permission DeniedUnable to get data from unzipped fileRecovering password from zip fileunzipping and re-zipping a file results in a different hash
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I unzipped a zipped file using zip -l but what get is a dir smaller than what it was before unzipping. Unzipped dir has all the files mostly videos. Am I missing something?
bash output of command ls -alh
:
centos zip unzip
New contributor
add a comment |
I unzipped a zipped file using zip -l but what get is a dir smaller than what it was before unzipping. Unzipped dir has all the files mostly videos. Am I missing something?
bash output of command ls -alh
:
centos zip unzip
New contributor
2
Video files are compressed (and almost always with a lossy codec). Trying to compress an already-compressed file usually results in a larger file. File compression relies on finding repeating patterns, and only the first application of compression produces the maximum benefit.
– sawdust
2 hours ago
Instead of ls -lah, try using du -h on the directory
– hojusaram
3 mins ago
add a comment |
I unzipped a zipped file using zip -l but what get is a dir smaller than what it was before unzipping. Unzipped dir has all the files mostly videos. Am I missing something?
bash output of command ls -alh
:
centos zip unzip
New contributor
I unzipped a zipped file using zip -l but what get is a dir smaller than what it was before unzipping. Unzipped dir has all the files mostly videos. Am I missing something?
bash output of command ls -alh
:
centos zip unzip
centos zip unzip
New contributor
New contributor
edited 2 hours ago
Twisty Impersonator
19.1k1468101
19.1k1468101
New contributor
asked 2 hours ago
bluedroidbluedroid
111
111
New contributor
New contributor
2
Video files are compressed (and almost always with a lossy codec). Trying to compress an already-compressed file usually results in a larger file. File compression relies on finding repeating patterns, and only the first application of compression produces the maximum benefit.
– sawdust
2 hours ago
Instead of ls -lah, try using du -h on the directory
– hojusaram
3 mins ago
add a comment |
2
Video files are compressed (and almost always with a lossy codec). Trying to compress an already-compressed file usually results in a larger file. File compression relies on finding repeating patterns, and only the first application of compression produces the maximum benefit.
– sawdust
2 hours ago
Instead of ls -lah, try using du -h on the directory
– hojusaram
3 mins ago
2
2
Video files are compressed (and almost always with a lossy codec). Trying to compress an already-compressed file usually results in a larger file. File compression relies on finding repeating patterns, and only the first application of compression produces the maximum benefit.
– sawdust
2 hours ago
Video files are compressed (and almost always with a lossy codec). Trying to compress an already-compressed file usually results in a larger file. File compression relies on finding repeating patterns, and only the first application of compression produces the maximum benefit.
– sawdust
2 hours ago
Instead of ls -lah, try using du -h on the directory
– hojusaram
3 mins ago
Instead of ls -lah, try using du -h on the directory
– hojusaram
3 mins ago
add a comment |
2 Answers
2
active
oldest
votes
The size of a directory as shown in your screenshot isn't the sum of the size of the contents, it is the size of the meta-data associated with the directory - file names, etc.
https://unix.stackexchange.com/questions/55/what-does-size-of-a-directory-mean-in-output-of-ls-l-command
To find out how much space the directory contents are using, you can use
du -sh /path/to/directory
add a comment |
Compression algorithms are typically divided into two categories:
- Lossy and 2. Lossless
Most compression algorithms which deals with lossy compression, meaning that
some non-essential bits of information is throwed away, are domain specific for the type of data it is trying to compress. Examples of such are
Jpeg for pictures, H.264 for video and Mp3 for audio. The reason why they are domain specific is that some kind of model is required how the data is perceived by humans. In Mp3 psycho-aucustic models are used to determine how various lossy transformations on the data affects how we humans perceives the audio.
The majority of general purpose compression algorithms like Zip files (which uses the Deflate algorithm) and XZ and 7zip which uses the ZMA/LZMA2 algorithms are general purpose lossless algorithms that uses information encoding theory only.
There are several lossless domain specific compression formats and algorithms as well. Examples are common: Portable Network Graphics (PNG) for pictures, HEVC / H.265 for video and FLAC for audio. These algorithms will typically perform slightly better than a general purpose compression algorithm on domain data, but fail on generic data, for which it was never designed to operate on.
If a general purpose compression algorithm fails to reduce the size of the input data set you can maybe have better success trying a domain specific lossless algorithm on your data. For example, for video data, you might want to try the x265 encoder: https://x265.readthedocs.io/en/default/lossless.html
New contributor
1
This is all true, but completely irrelevant to the question.
– Michael Hampton
1 hour ago
@MichaelHampton However, this answer will probably be more likely what is being searched for when finding this question on google.
– Ajay
36 mins ago
1
@Ajay That seems strange to me but in that case, it probably should be an answer to a different question.
– Michael Hampton
30 mins ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "3"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
bluedroid is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1438770%2fwhy-is-unzipped-file-smaller-than-zipped-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The size of a directory as shown in your screenshot isn't the sum of the size of the contents, it is the size of the meta-data associated with the directory - file names, etc.
https://unix.stackexchange.com/questions/55/what-does-size-of-a-directory-mean-in-output-of-ls-l-command
To find out how much space the directory contents are using, you can use
du -sh /path/to/directory
add a comment |
The size of a directory as shown in your screenshot isn't the sum of the size of the contents, it is the size of the meta-data associated with the directory - file names, etc.
https://unix.stackexchange.com/questions/55/what-does-size-of-a-directory-mean-in-output-of-ls-l-command
To find out how much space the directory contents are using, you can use
du -sh /path/to/directory
add a comment |
The size of a directory as shown in your screenshot isn't the sum of the size of the contents, it is the size of the meta-data associated with the directory - file names, etc.
https://unix.stackexchange.com/questions/55/what-does-size-of-a-directory-mean-in-output-of-ls-l-command
To find out how much space the directory contents are using, you can use
du -sh /path/to/directory
The size of a directory as shown in your screenshot isn't the sum of the size of the contents, it is the size of the meta-data associated with the directory - file names, etc.
https://unix.stackexchange.com/questions/55/what-does-size-of-a-directory-mean-in-output-of-ls-l-command
To find out how much space the directory contents are using, you can use
du -sh /path/to/directory
answered 2 hours ago
ivanivanivanivan
1,41937
1,41937
add a comment |
add a comment |
Compression algorithms are typically divided into two categories:
- Lossy and 2. Lossless
Most compression algorithms which deals with lossy compression, meaning that
some non-essential bits of information is throwed away, are domain specific for the type of data it is trying to compress. Examples of such are
Jpeg for pictures, H.264 for video and Mp3 for audio. The reason why they are domain specific is that some kind of model is required how the data is perceived by humans. In Mp3 psycho-aucustic models are used to determine how various lossy transformations on the data affects how we humans perceives the audio.
The majority of general purpose compression algorithms like Zip files (which uses the Deflate algorithm) and XZ and 7zip which uses the ZMA/LZMA2 algorithms are general purpose lossless algorithms that uses information encoding theory only.
There are several lossless domain specific compression formats and algorithms as well. Examples are common: Portable Network Graphics (PNG) for pictures, HEVC / H.265 for video and FLAC for audio. These algorithms will typically perform slightly better than a general purpose compression algorithm on domain data, but fail on generic data, for which it was never designed to operate on.
If a general purpose compression algorithm fails to reduce the size of the input data set you can maybe have better success trying a domain specific lossless algorithm on your data. For example, for video data, you might want to try the x265 encoder: https://x265.readthedocs.io/en/default/lossless.html
New contributor
1
This is all true, but completely irrelevant to the question.
– Michael Hampton
1 hour ago
@MichaelHampton However, this answer will probably be more likely what is being searched for when finding this question on google.
– Ajay
36 mins ago
1
@Ajay That seems strange to me but in that case, it probably should be an answer to a different question.
– Michael Hampton
30 mins ago
add a comment |
Compression algorithms are typically divided into two categories:
- Lossy and 2. Lossless
Most compression algorithms which deals with lossy compression, meaning that
some non-essential bits of information is throwed away, are domain specific for the type of data it is trying to compress. Examples of such are
Jpeg for pictures, H.264 for video and Mp3 for audio. The reason why they are domain specific is that some kind of model is required how the data is perceived by humans. In Mp3 psycho-aucustic models are used to determine how various lossy transformations on the data affects how we humans perceives the audio.
The majority of general purpose compression algorithms like Zip files (which uses the Deflate algorithm) and XZ and 7zip which uses the ZMA/LZMA2 algorithms are general purpose lossless algorithms that uses information encoding theory only.
There are several lossless domain specific compression formats and algorithms as well. Examples are common: Portable Network Graphics (PNG) for pictures, HEVC / H.265 for video and FLAC for audio. These algorithms will typically perform slightly better than a general purpose compression algorithm on domain data, but fail on generic data, for which it was never designed to operate on.
If a general purpose compression algorithm fails to reduce the size of the input data set you can maybe have better success trying a domain specific lossless algorithm on your data. For example, for video data, you might want to try the x265 encoder: https://x265.readthedocs.io/en/default/lossless.html
New contributor
1
This is all true, but completely irrelevant to the question.
– Michael Hampton
1 hour ago
@MichaelHampton However, this answer will probably be more likely what is being searched for when finding this question on google.
– Ajay
36 mins ago
1
@Ajay That seems strange to me but in that case, it probably should be an answer to a different question.
– Michael Hampton
30 mins ago
add a comment |
Compression algorithms are typically divided into two categories:
- Lossy and 2. Lossless
Most compression algorithms which deals with lossy compression, meaning that
some non-essential bits of information is throwed away, are domain specific for the type of data it is trying to compress. Examples of such are
Jpeg for pictures, H.264 for video and Mp3 for audio. The reason why they are domain specific is that some kind of model is required how the data is perceived by humans. In Mp3 psycho-aucustic models are used to determine how various lossy transformations on the data affects how we humans perceives the audio.
The majority of general purpose compression algorithms like Zip files (which uses the Deflate algorithm) and XZ and 7zip which uses the ZMA/LZMA2 algorithms are general purpose lossless algorithms that uses information encoding theory only.
There are several lossless domain specific compression formats and algorithms as well. Examples are common: Portable Network Graphics (PNG) for pictures, HEVC / H.265 for video and FLAC for audio. These algorithms will typically perform slightly better than a general purpose compression algorithm on domain data, but fail on generic data, for which it was never designed to operate on.
If a general purpose compression algorithm fails to reduce the size of the input data set you can maybe have better success trying a domain specific lossless algorithm on your data. For example, for video data, you might want to try the x265 encoder: https://x265.readthedocs.io/en/default/lossless.html
New contributor
Compression algorithms are typically divided into two categories:
- Lossy and 2. Lossless
Most compression algorithms which deals with lossy compression, meaning that
some non-essential bits of information is throwed away, are domain specific for the type of data it is trying to compress. Examples of such are
Jpeg for pictures, H.264 for video and Mp3 for audio. The reason why they are domain specific is that some kind of model is required how the data is perceived by humans. In Mp3 psycho-aucustic models are used to determine how various lossy transformations on the data affects how we humans perceives the audio.
The majority of general purpose compression algorithms like Zip files (which uses the Deflate algorithm) and XZ and 7zip which uses the ZMA/LZMA2 algorithms are general purpose lossless algorithms that uses information encoding theory only.
There are several lossless domain specific compression formats and algorithms as well. Examples are common: Portable Network Graphics (PNG) for pictures, HEVC / H.265 for video and FLAC for audio. These algorithms will typically perform slightly better than a general purpose compression algorithm on domain data, but fail on generic data, for which it was never designed to operate on.
If a general purpose compression algorithm fails to reduce the size of the input data set you can maybe have better success trying a domain specific lossless algorithm on your data. For example, for video data, you might want to try the x265 encoder: https://x265.readthedocs.io/en/default/lossless.html
New contributor
New contributor
answered 2 hours ago
user3504575user3504575
172
172
New contributor
New contributor
1
This is all true, but completely irrelevant to the question.
– Michael Hampton
1 hour ago
@MichaelHampton However, this answer will probably be more likely what is being searched for when finding this question on google.
– Ajay
36 mins ago
1
@Ajay That seems strange to me but in that case, it probably should be an answer to a different question.
– Michael Hampton
30 mins ago
add a comment |
1
This is all true, but completely irrelevant to the question.
– Michael Hampton
1 hour ago
@MichaelHampton However, this answer will probably be more likely what is being searched for when finding this question on google.
– Ajay
36 mins ago
1
@Ajay That seems strange to me but in that case, it probably should be an answer to a different question.
– Michael Hampton
30 mins ago
1
1
This is all true, but completely irrelevant to the question.
– Michael Hampton
1 hour ago
This is all true, but completely irrelevant to the question.
– Michael Hampton
1 hour ago
@MichaelHampton However, this answer will probably be more likely what is being searched for when finding this question on google.
– Ajay
36 mins ago
@MichaelHampton However, this answer will probably be more likely what is being searched for when finding this question on google.
– Ajay
36 mins ago
1
1
@Ajay That seems strange to me but in that case, it probably should be an answer to a different question.
– Michael Hampton
30 mins ago
@Ajay That seems strange to me but in that case, it probably should be an answer to a different question.
– Michael Hampton
30 mins ago
add a comment |
bluedroid is a new contributor. Be nice, and check out our Code of Conduct.
bluedroid is a new contributor. Be nice, and check out our Code of Conduct.
bluedroid is a new contributor. Be nice, and check out our Code of Conduct.
bluedroid is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1438770%2fwhy-is-unzipped-file-smaller-than-zipped-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
Video files are compressed (and almost always with a lossy codec). Trying to compress an already-compressed file usually results in a larger file. File compression relies on finding repeating patterns, and only the first application of compression produces the maximum benefit.
– sawdust
2 hours ago
Instead of ls -lah, try using du -h on the directory
– hojusaram
3 mins ago