Raul Fraile: How GZIP compression works | JSConf EU 2014

Поділитися
Вставка
  • Опубліковано 24 сер 2024
  • Data compression is an amazing topic. Even in today’s world, with fast networks and almost unlimited storage, data compression is still relevant, especially for mobile devices and countries with poor Internet connections.
    For better or worse, GZIP compression is the de-facto lossless compression method for compressing text data in websites. It is not the fastest nor the better, but provides an excellent tradeoff between speed and compression ratio. The way Internet works makes it also difficult to use newer compression methods.
    This talk examines how GZIP works internally, explaining the internals of the DEFLATE algorithm, which is a combination of LZ77 and Huffman coding. Different implementations will be compared, such as GNU GZIP, 7-ZIP and zopfli, focusing on why and how some of these implementations perform better than others.
    Finally, we will try to go beyond GZIP, preprocessing our data to achieve better results. For example, transposing JSON.
    Transcript & slides: 2014.jsconf.eu/...
    License: For reuse of this video under a more permissive license please get in touch with us. The speakers retain the copyright for their performances.

КОМЕНТАРІ • 15

  •  4 роки тому +7

    Why is the presenter taking up the majority of the screen instead of the slides 90% of the time? Text is unreadable.

  • @pauldacus4590
    @pauldacus4590 6 років тому +5

    4:31 "facial eggs presentations"
    Machine translations FTW!

  • @Bajo85
    @Bajo85 2 роки тому

    Loved the presentation, thanks!

  • @pankaj.parkar
    @pankaj.parkar 6 років тому +1

    Nice informative and neatly presented. Thanks alot

  • @nooxis
    @nooxis 9 років тому

    Great talk. Thanks!

  • @disorderedenthropy
    @disorderedenthropy 6 років тому +2

    what's the difference between gzip and zlib?

    • @baganatube
      @baganatube 6 років тому +2

      Both gzip and zlib streams are very thin container formats around the Deflate algorithm. Gzip can contain slightly more extra information (timestamps, filenames, comments, etc), but not in practice. Although both of them do allow algorithms other than Deflate, neither actually defines any. Read RFC 1950, 1951, and 1952, they are all quite short.

    • @SalmanRavoof
      @SalmanRavoof 4 роки тому

      zlib is an abstraction of gzip. They both work on the same algorithm, but zlib is just a library.

    • @Chai-T-Rex
      @Chai-T-Rex 2 місяці тому

      @@baganatube Are you certain that gzip is a container format? You generally need to use .tar.gz with tar being the container format and gz being mere compression.

    • @baganatube
      @baganatube 2 місяці тому

      @@Chai-T-Rex By "container" I didn't mean collecting multiple files into one stream, for which you need a format like tar.

    • @Chai-T-Rex
      @Chai-T-Rex 2 місяці тому

      @@baganatube Ahh, OK. I looked into it and I didn't know that gzip stored the original filename. Thanks!

  • @Crazzilla
    @Crazzilla 9 років тому

    Does Gzip change what you see when using View Source?

  • @joeye6556
    @joeye6556 Рік тому

    11:04 that huffman encoding is wrong. its impossible to tell whether the first 3 0s are 3 Ls, an H and an L, or a D. Dude didn't even try to make a proper huffman tree, just listed binary strings in lexicographical order and assigned a value to them.

    • @chinoto1
      @chinoto1 9 місяців тому +2

      I thought the same thing, but he starts correcting that 10 seconds later.