This is exactly what 100 Seconds is for. I'm never going to do a full course on gzip but it's nice to know what it's about.
@santiagolerin2 жыл бұрын
No need, there's the manpage Or the tldr
@Piupiumacher2 жыл бұрын
you will at some point face gzip and wonder what the magical parameter string means it's just a matter of time
@DivByZer02 жыл бұрын
In 100 seconds he managed to mess up the name of one of the inventors...Mark Adler, not "Alder".
@pelic96082 жыл бұрын
There's "full courses" on gzip? What? 😄
@MrEnsiferum772 жыл бұрын
I've tried to read book about compression once and I regret it.
@puito69702 жыл бұрын
When I first got into linux all these words "tar", "gzip", "tarball" and their commands were a mystery which took me way longer than 100s to figure out. This video is gold for getting started. Putting all this in perspective in less than 2 minutes is just awesome.
@kte44232 жыл бұрын
I also like how they are not afraid to get "funny" with it. You have "more" and then "less" ("less is more"), you have weird names like 🔫zip, and tarball, and to get help with something you call the "man"
@daniel_22 жыл бұрын
@@kte4423 but man isn't originally funny. I think its short for manual (like a computer manual/book)
@kte44232 жыл бұрын
@@daniel_2 Sure, gunzip makes sense too. I just find it funny that it's called "gun" (zip)
@RealFlicke Жыл бұрын
It's also ridiculously hard to zip/tar things with CLI compared to a GUI. Archiving and compressing being separate commands, weird flags you have to learn and footguns like accidentally zipping every file in a folder individually (happened to me several times).
@zatrox94382 жыл бұрын
SO THAT'S WHAT THE TAR EXTENSION IS, was always curious about that whenever i had to do something in linux, but never actually searched it up
@ChillAutos2 жыл бұрын
Wow this was my exact reaction as well. I was always so confused about the .tar.gz, makes so much sense now
@danielrdrigues2 жыл бұрын
sigh, fucking normies, 5y.o I was compiling arch.
@yewo.m2 жыл бұрын
Yeah, it's helped me to finally know why the files end in their composite extension like .tar.gz instead of just .tar or .gz or something else
@fakezpred2 жыл бұрын
TApe aRchive
@fhujf2 жыл бұрын
@@fakezpred No, it's Tape ARchive. Do you even Unix?!
@kebien60202 жыл бұрын
One interesting difference with zip is that in zip each file is compressed and then archived, whereas in tar.gz you archive all the files and then compress the whole thing. Advantage: Cross-file compression (i.e. repeated patterns across files are used for compression) Disadvantage: You can not extract a single file and leave the rest alone.
@Winnetou172 жыл бұрын
That's what's nice in RAR, it has a flag for that. If you want to compress a huge library of pictures or videos for example, you might want to have them independently compressed. But a large database or text-like files or things like a complete game / program you might want to compress the whole archive.
@dorukayhanwastaken2 жыл бұрын
Couldn't one just gzip [insert glob pattern here] and then tar the individually gzipped files if non-solid compression is necessary?
@lawrencedoliveiro91042 жыл бұрын
The main use for archives that I see is not for saving my own data, but for distributing collections of files. And normally when you get one of those you want to extract everything.
@smallcatgirl2 жыл бұрын
@@Winnetou17 7z is the new rar.
@PauxloE2 жыл бұрын
The actual compression algorithm (deflate) is the same between zip and gzip. Zip adds the archiving around it, while gzip just adds a small header and a checksum, so it's lighter.
@sharpfang2 жыл бұрын
You're all lucky newer implementations of Tar stripped all the tape-related stuff. Reading through the man page you'd spend an hour to find how to create, or add to an archive, while in the process learning how to rewind the tape, seek the next archive on tape, activate a jukebox-like tape swapper mechanism, wipe a tape, check whether there's enough free space after the last archive to fit yours, switch to a different track on a multi-track tape, set tape drive rpm, and a myriad of others.
@daleryanaldover65452 жыл бұрын
that seems fun
@Truly12p2 жыл бұрын
@@daleryanaldover6545 but probably counter-productive too
@stickyfingies2 жыл бұрын
What? ...huh?? was Tar actually used in the days of magnetic-strip-tape memory?
@symix.2 жыл бұрын
@@stickyfingies what "in the days"? Tape drives are used a lot right now in datacenters, like google and amazon, they are great for long term data storage
@stickyfingies2 жыл бұрын
@@symix. I had no idea; crazy
@sum11792 жыл бұрын
This man is so considerate, he even included the -v flag (which for starters stands for verbose) just so you can see your files being compressed, truly a born teacher. Here's an explanation of the flags used by him: -c = stands for create, it's the one you'd use the most. -z = tells tar to compress using gzip. There's many other ones you can choose from, which imo gzip being the best. -v = verbose, tells tar to display output in the terminal. -f = stands for filename, usually a directory. You can read most, if not all options using the --help command, with two hyphens. Even if you use windows, using the terminal makes your life way faster if you get used to it. I highly recommend giving a shot to the lifestyle.
@Gesepp952 жыл бұрын
Where can I learn about the basic Windows equivalents to core GNU functions?
@sum11792 жыл бұрын
@@Gesepp95 Most of the stuff you can use in linux is included in windows as aliases. They should have similar, if not the same functions that what you're used to has.
@Gesepp952 жыл бұрын
@@sum1179 Thank you!
@scoreunder2 жыл бұрын
not gonna lie, i assume when most people write tar -cvf that they literally just learned it as a package deal and haven't looked into it.
@Ogmobot2 жыл бұрын
I remember the flags as "Compress Ze V--king Files"
@Mutual_Information2 жыл бұрын
It’s refreshing when a video focuses on information density
@colton89712 жыл бұрын
While an undeniably good developer, Jeff really shines with his ability to synthesize and condense down information. These videos are snappy, engaging, and eloquent. Thank you a million, Jeff.
@nitromegamer1002 жыл бұрын
fireship your insane! im binging your entire videos like high quality paid courses and its actually helping me alot in my assignments, kudos
@GiggityGlen2 жыл бұрын
Oh yeah, compression really played a hand when I implemented a redis caching in the backend. It significantly reduced memory usage and network traffic to cloud redis. And gzip is actually really fast too (we save string to redis as key val).
@erickshaffer66152 жыл бұрын
So it is string key and gzip file as the Val?
@tomydurazno62432 жыл бұрын
Had the same issue, using compressed GZip strings and Redis type Hash, the size used is 1/10 of what it was before
@GiggityGlen2 жыл бұрын
Nah, you can save different data types as val but not a file if I remember right. What I did is JSON stringified data and compress the string after. Issue with this approach is that Json parse is not enough to convert values like functions, but that's okay cos you shouldn't be caching functions inside redis anyway. Oh and Json parse is crazy fast to in es5
@liamkearn2 жыл бұрын
What did I just read 😂
@augustday94832 жыл бұрын
I had to write my own implementation of the Huffman encoding algorithm for a computer science class back in the day. Compression and data encoding is a really interesting subject! It's an interesting scientific problem to figure out how to represent lossless information in the last amount of bits possible.
@fabian.hertwig2 жыл бұрын
I love that your channel is pure information, no duplication. Perfect compression 👌🏼😌
@bloocifer2 жыл бұрын
tarballs sounded so intimidating to me and i thought it was something complicated lmfaoo i always wondered. its so freaking simple. i just made gzipped and gunzipped a couple files and then made a tarball out of them. shrank 250kb to 80kb. Cool stuff lol Just goes to show you how you can get in your own way sometimes. And also how good Fireships videos are.
@RottenMuLoT Жыл бұрын
One if not the most undervalued algorithm for a dev. I solved a couple of difficult performance issues only by using gzip at the right moment. You can read a gzip stream in a memory efficient manner as well and you don't need level 9 compression to benefit good compression ratio.
@LePhenixGD2 жыл бұрын
I learned more in 2 minutes KZbin video understanding how GZIP works with Linux than an entire month at college Thnk you for making this video!
@AshishKadam2 жыл бұрын
These 100 second videos are in a way gzipped version of all the knowledge acquired over a long time, isn't it? 🙂
@avidrucker2 жыл бұрын
😂😂😂
@bobonaqa2 жыл бұрын
more like jpeg lol
@ZelenoJabko2 жыл бұрын
It would need brotli. Then it would maybe actually be 100 seconds
@hxrprxt2 жыл бұрын
"{Linux_Command} in 100 seconds" is the series that the world needs.
@gabrielmora6144 Жыл бұрын
omg I actually understand tar gz now. this is fantastic.
@juice22 жыл бұрын
I usually use zstd (Zstandard) for files when the portability of gzip or zip is not required. Also lz4 is pretty cool to use in applications because of its ultra-low compression and decompression overhead.
@lawrencedoliveiro91042 жыл бұрын
zstd is widespread enough that you can consider it portable nowadays. And tar supports it, too.
@smallcatgirl2 жыл бұрын
btrfs uses zstd transparent compression.
@MenacingPerson2 жыл бұрын
Not by default.
@smallcatgirl2 жыл бұрын
@@MenacingPerson but it does in fedora.
@pavelperina76292 жыл бұрын
@@lawrencedoliveiro9104 I wouldn't say so. Give tar.zst or 7z created with zstd/brotli/lz4 patch to 100 people, I guess one of them will be able to decompress it. When I experimented with LZ4 i found it's useless for anything, but sparse data (such as segmentation labels where index does not change often) and then it's perfect - something like run-length compression. Am I wrong about LZ4? One I stumbled on lossy compression of scientific data that had maximum allowed error and that was likely using some kind of predictor (basically it compressed n-dimensional arrays of integers or floating point), but I have no idea what was the name and if it was free (I think it was not).
@souravdhar472 жыл бұрын
this probably is the epitomy of how to much knowledge can be squezed into a juicy video
@adamhenriksson60072 жыл бұрын
I thought he was out of ideas, now I see he is only getting started. THIS is the good stuff
@joross82 жыл бұрын
Always enjoy content designed around re-enforcing the basics. Your 100 second format is a great way of presenting it.
@jordan.mackie2 жыл бұрын
It's a friday night, I'm absolutely hammered, and now ecstatic to know why it's called a TAR file. So glad I found this channel
@santiagolerin2 жыл бұрын
I would loved to have this video 5 years ago when i deep dived into linux. It's excellent ❤️
@minhthinhhuynhle91032 жыл бұрын
Keep everything abstract until you aim for using it. This is the reason I follow Jeff's tutorial.
@nathanielsabanski2 жыл бұрын
Left out the standard for most *nix packages in 2022... zstd. The whole linux ecosystem pretty much uses zstd now. It's insanely good.
@xrafter2 жыл бұрын
Never heard of zstd. Should I use ?
@lawrencedoliveiro91042 жыл бұрын
Yes, it is definitely becoming more popular. Blender has removed the option for gzip compression when saving its documents (though it can still read existing gzip-compressed ones) in favour of zstd.
@slonkazoid Жыл бұрын
zstd would beat out brotli on the web if it were implemented with a similar dictionary
@lawrencedoliveiro91042 жыл бұрын
The key point not mentioned here is that information content is a statistical concept. The closer your data stream looks like to random noise, the less compressible it is. It is inherent in the design of compression algorithms that they produce a data stream that looks very much like random noise.
@xorinzor2 жыл бұрын
I really love these kind of videos. Short & sweet. You really feel like you've learned some fundamental (and interesting!) things in a very short amount of time
@ZanarkandStarplayer2 жыл бұрын
I've never had that feeling of wow a video dropped right at the perfect time, until now
@MercyFromOverwatch22 жыл бұрын
Jeff is still my favourite tech youtuber
@ItzZed2 жыл бұрын
Yessss, please do more videos like this. Linux commands like these are made easier to grasp like this. Do the tar command next!
@antonyjr.devlogs5957 Жыл бұрын
Funfact, the like button glows when Jeff say's like and subscribe
@niquezebi7991 Жыл бұрын
yes i thought i was the only one see it
@paulgreen4161 Жыл бұрын
Have watched a lot of your 100 seconds explanation and they are great but I given the nature of this one I thought you might have squeezed it into 50 seconds!!! Keep up the great work and thx!
@richardlin23592 жыл бұрын
In my 4th year of computer engineering and i never thought to actually figure out what tar stood for/ came from It makes it so much easier to remember what it does
@dummypg61292 жыл бұрын
Just about time when I am currently working/understanding gzip for my nginx config. Good intro, adds 2yrs of exp in my resume...
@vicradon2 жыл бұрын
Thank you Jeff for another amazing computer science explanation. I think you should make a video about data transformation with DBT.
@AndrewSunada2 жыл бұрын
Nice! Super informative! Been doing this over 12 years and just this is a ton of news to me.
@douglasemsantos2 жыл бұрын
The best explanation I found about tar is in this 100 seconds video. Thank you!
@ZelenoJabko2 жыл бұрын
It is not freaking 100 seconds!
@ilearncode73652 жыл бұрын
This is exactly what 100 seconds is for. He teaches you just enough of a topic that it barely remains useless information that you cannot apply, but you FEEL like you are being productive and are “learning”.
@Katchmagyk2 жыл бұрын
I didn’t realize how much I wanted this video!
@optymystyc2 жыл бұрын
“Ending in dot Jeezy” that took me out. Lol. You’re goated for that one 😂.
@FreshSmog2 жыл бұрын
Wat. Living in the era of winrar and 7zip, it never occurred to me that archiving was an intermediary step for zipping multiple files, I always assumed the compression program would handle it on it's own. I've never been able to figure out the purpose of tar until this video. So that's what .gz and tar.gz meant.
@NSLikeableHuman2 жыл бұрын
It also nicely fits with the UNIX philosophy of having small programs doing a single focussed job. tar does the archiving while gzip does the compressing. :)
@hfislwpa2 жыл бұрын
I've learned so much from these 100 seconds videos, thanks a billion
@mxbc_ebk50862 жыл бұрын
This dude actually made gzip interesting 😭
@_modiX2 жыл бұрын
Finally the tarball hits the ground and gzips. Enlightenment.
@Tellurian72 жыл бұрын
An eleguant way to talk about the things we use everyday, thanks.
@Aprofox2 жыл бұрын
those 100 seconds series is fking AMAZING !!!!
@null34142 жыл бұрын
once i get my next paycheck i'm buying lifetime pro on your website, keep up the great work man
@himanshuraj56352 жыл бұрын
huge fan of this series
@K5Doom Жыл бұрын
The way I always remember the flags to gzip+tarball is thinking in Arnold's voice "Compress Ze Files!!!" -czf
@MohitKhare Жыл бұрын
Throwing my hat's away. Thanks you, this was really helpful. ❤
@sxlg_322 жыл бұрын
Oh yes, the newest fireship video. Great as always!
@satyajeetsahu52702 жыл бұрын
I liked this video more than all the language videos in this channel.
@PrimeToolbox2 жыл бұрын
You are the master td;lrizer of computer concepts! Awesome channel.
@prashantmaharana34672 жыл бұрын
These videos nowadays feels like blessings 💜
@DevOpsBoss2 жыл бұрын
Top-notch quality content as always! PS. Didn't expect to see the Snowman in the vid 😎
@victorpinasarnault91352 жыл бұрын
I love your videos! I can't get enough of them.
@adesh1162 жыл бұрын
This is the perfect one.. The perfect material for 100 seconds IMO..
@MonSteh2 жыл бұрын
Thanks for providing us with the command to archive/compress tarball files, my brain can't wait to forget it 🙃
@pranavprashant11962 жыл бұрын
This saved me in production. I saw a massive reduction of 70% in case of large nested json lists having similar keys. It reduced 400+KB data size to approx 100+KB in my case
@nguyenducminh49662 жыл бұрын
@Fireship 1:35 You're incorrect about the compression ratio. A ratio of 90.3% means that the size of the compressed file equals 90.3% of that of the original file, which means that the lower the ratio, the more compressed it is.
@FaisalAfroz2 жыл бұрын
I was also confused about the ratio formula whether it is calculated as (new)/(original) or (original-new)/original.
@xrafter2 жыл бұрын
Ratio + Ls + Gzip
@weewam25302 жыл бұрын
OMG, it really worked. Thank you so much!!
@fuelformind2 жыл бұрын
wish one day i can make pro and clear videos like yours great job always (im not a programmer i just enjoy the videos)
@Diego-Garcia Жыл бұрын
Loved that bonus of "what is tar". That's why the .tar.* extensions.
@466202 жыл бұрын
-czvf and -xzvf are the only tar flags I know, and im happy to see it basically used in this video
@slonkazoid Жыл бұрын
i dont think you need -z while eXtracting anymore also try czavf instead
@Kitulous Жыл бұрын
that's why the extension is .tar.gz because .tar turns multiple files into one file and .gz compresses that file as it cannot compress multiple files
@felixc.programs82092 жыл бұрын
Very inspiring! Your content is really great and has helped shape me as a new KZbinr and also data scientist/software engineer. Thanks a lot!
@TheDingsBoms2 жыл бұрын
These videos are so helpful and revealing for stuff I’ve always wondered about thank you!
@PanoptesDreams2 жыл бұрын
This is critical information for a new Linux user. I just made some connections myself 😅
@philippefutureboy73482 жыл бұрын
Tar has always been a mystery to me. Thanks for explaining it so clearly!
@towb0at2 жыл бұрын
best video for this format yet
@ImLlaver2 жыл бұрын
Can you do some "in 100 seconds" videos on different IDE's and build tools? Would be really cool to see a condensed explanation of VSCode, WebStorm, Postman, etc.
@shlongchad61592 жыл бұрын
VS Code is a general purpose code editor that plays nice with all languages, as long as there's an extension for one. WebStorm, if I recall correctly, is a highly specialized IDE for writing JavaScript and related stuff, TypeScript, etc. I presume. It has specific features to work with JavaScript built into it that you either can't get on VSCode or need a ton of extensions to replicate. Postman is an app that's used to test API endpoints and develop API systems.
@ImLlaver2 жыл бұрын
@@shlongchad6159 I've used all of these specific pieces of software and know them well, just figured they would be a good starting point if Fireship decides to branch out to development tools.
@tropicaldog4302 жыл бұрын
He has videos about vscode and vim i think
@Kerbiter2 жыл бұрын
how to exit vim in 100 seconds
@woalk Жыл бұрын
@@KerbiterAnd it’s just “ESC :qa!” and then 99 seconds of silence?
@Argletrough2 жыл бұрын
p sure you can use -a instead of -z with tar and it will determine which compression algorithm to use based on the extension of the archive file name you provide
@markdlp2 жыл бұрын
Really helpful all this terminology is demystified 🙌🏿
@waiitwhaat2 жыл бұрын
I WISH I watched this video when I first started using and learning Ubuntu years ago. This would have been a life changer for me
@DanielitoPadayhagJr2 жыл бұрын
Great! Thanks Jeff! Now I can add gzip to my resume!
@Д.С-б3ь2 жыл бұрын
Those 100 seconds videos are just fire!🔥
@antoninjacob22322 жыл бұрын
When 100 seconds help you understand what happens and finally you remember all 4 arguments to pass to the tar command!
@mikecebul2 жыл бұрын
Thanks, now I have more questions then when I started.
@TheMrBvcx2 жыл бұрын
Great content, as always !
@SoulisYT Жыл бұрын
This is awesome !!! I was always wondering why we use the combination on tar and gzip. Now I know !!!
@mekhoinfo21182 жыл бұрын
I definitely support these kinds of videos where we discover some of Linux commands.
@joshuapare4304 Жыл бұрын
gRPC in 100 Seconds please!! We’ve started using gRPC at our company and love it, mostly for the type enforcement and reduced payload size thanks to sending information over a binary stream instead of human readable, inefficient-to-parse JSON
@georgecop95382 жыл бұрын
You can easily do compression with numbers: Instead of writing ASCII digits, decompose the number in bytes and write the bytes to file.
@YoannBuzenet2 жыл бұрын
Really nice video, please do every stuff we encounter on linux like that!
@Wartinald2 жыл бұрын
0:37 and that's how I accidentally discovered a way of making Heroes of Might & Magic 3 styled trees 👀
@hajjdawood Жыл бұрын
As a note, the superior operating system (macOS) also has gzip built in give that it runs on a Unix subsystem (better then the cheap imitation known as linux)
@galgrunfeld99542 жыл бұрын
The information in this video is pretty compressed, too.
@being_aslam_tiger2 жыл бұрын
Thanks for making video on gzip. Huge thanks. Also could you please make video on... other tools and protocols.
@jonathanfraimorice82922 жыл бұрын
Awesome video as always, I would love a more thorough video on how gzip actually works internally
@alandto39962 жыл бұрын
Thank you jeff for this very informative video!
@KingThrillgore2 жыл бұрын
Compared to LZMA and xzip, gzip isn't the most efficient at compression, but its ubiquitous. And the original developers didn't become miserable drunks long after releasing it. Mark Adler (you misspelled his name) still works at NASA.
@jamhamtime18782 жыл бұрын
Which one is LZMA again? Is it the one where you'd get unbelievably tiny files, but it takes super long to compress and decompress? Would also recommend lrzip, faster and smaller file size than bz2
@xrafter2 жыл бұрын
@@jamhamtime1878 What about this brotli thing? Have you tried it?
@xrafter2 жыл бұрын
@@jamhamtime1878 Also lzma is like xz but different.
@KingThrillgore2 жыл бұрын
@@jamhamtime1878 actually I think that's bzip and it's really slow to unpack.
@slonkazoid Жыл бұрын
@@jamhamtime1878 LZMA2 is the algo behind xz heard about lrzip and i think it is cool but basically only exists on linux
@Max_Jacoby2 жыл бұрын
RAR is my favorite one! It's the only compression tool that can contain redundant information for restoration. It saved me a lot of troubles several times so I always add redundant info.
@santi100a2 жыл бұрын
1:07 End-to-end compression, where a file is compressed on the server, then decompressed by the browser to reduce the amount of data sent over the network.
@MarkoSkace2 жыл бұрын
Yeah! We're onto algorithms.
@supercraftd20742 жыл бұрын
Thanks! I had been trying to make a web game load faster. People told me to use gzip, but I had no idea how! Your video came at the perfect time
@brandonsayring2 жыл бұрын
What sort of web game?
@jamhamtime18782 жыл бұрын
Uuuuh what kind of web game are you doing, and what kind of data loading are you doing that it's slow? Usually you wouldn't do this kind of gzip for serving data on the web, maybe use something like nginx, or whatever framework you're using for inbuilt gzip options. For example, if you're using nginx already, you just need to write the directive gzip on You can even vary between the sizes you want, etc. I also know next.js just has an option to compress. You'd probably want to use those instead of manually gzipping your files
@mfaizsyahmi2 жыл бұрын
you shouldn't handle the gzipping of your stuff in your game code, but in the web server serving the game files. it does gzipping on the fly. and of course set it up to cache static files so it's not constantly gzipping every request.
@nardu2 жыл бұрын
Your like && subscribe tag is always on point. Loved it getting zipped at the end! 🤣🤣
@harveyaptx73562 жыл бұрын
I love your content man. 💜
@technanner2 жыл бұрын
I was today years old when I realized gunzip was g-unzip, and not just a cool name for a command
@KingThrillgore2 жыл бұрын
I've always used `tar xzvf` in place of gunzip.
@mojacodes2 жыл бұрын
@@KingThrillgore oh wait the tar subcommands themselves are compressed too?
@xrafter2 жыл бұрын
@@mojacodes The z in xzvf is gzip. Keep in my v is not need only xzf is enough.
@mojacodes2 жыл бұрын
@@xrafter well they still are compressed, but thanks for the info anyways!
@lawrencedoliveiro91042 жыл бұрын
Actually tar will automatically recognize the compression format when extracting, so “xvf” should work on all compressed tar archives.
@PR1V4TE2 жыл бұрын
This gun-zip is the only thing I ever know before watching your videos.