字幕组成品列表(Beta)
  • 写在前面
  • Android 平台
    • Game On! 游戏开发系列 - 031
      • Pie Noon - 1503060393
      • The Death of Base Game Activity - 1504030543
      • Surviving OpenGL Context Loss - 1504030546
      • WebP for Game Devs - 1504030547
      • Saved Games In-Depth (Part 1) - 1504070556
      • Saved Games In-Depth (Part 2) - 1504030548
      • Smaller Flipbook Textures with CRABBY - 1504030544
      • Google Tag Manager - 1504030545
      • Flatbuffers - 1505050794
      • Achievement Point Pointers - 1505050796
      • Frequency Scaling - 1505050797
      • Meet the Management APIs - 1501140367
      • Y U Ship Broken Games - 1505050795
    • Android 性能优化 - 088
      • Garbage Collection in Android - 1503170425
      • Performance Cost of Memory Leaks - 1503170424
      • Rendering Performance 101 - 1501130351
      • Understanding Overdraw - 1501130352
      • Understanding VSYNC - 1501130353
      • Tool - Profile GPU Rendering - 1501130354
      • Why 60fps? - 1501130355
      • Android UI and the GPU - 1501130356
      • Invalidations, Layouts, and Performance - 1501130357
      • Overdraw, Cliprect, QuickReject - 1501130358
      • Tool - Memory Monitor - 1501130363
      • Battery Performance 101 - 1501130364
      • Understanding Battery Drain on Android - 1501130365
      • Battery Drain and WakeLocks - 1501130366
      • Memory Performance 101 - 1504170661
    • I/O 2014 Android 开发专题 - 089
      • Activity Transitions - 1504020505
      • Building Apps For Android TV - 1504020520
      • Building great Android media experiences - 1504020510
      • Building a quality app from start to finish - 1504020515
      • App Indexing API - 1504020507
      • What's new in WebView - 1504010484
      • Bluetooth Low Energy - 1504010486
      • Building impressive Android media experiences - 1504010493
      • The next Generation of Authentication - 1504020497
      • Don't Alpha That Pixel! - 1504020523
      • NFC + HCE Your phone in an interactive world - 1504020509
      • Demystifying encodes and decodes of WebM - 1504020521
      • Google Cloud Messaging - 1504020524
      • Getting your Game on the Big Screen - 1504020518
      • I hear you like realtime memes - 1504020511
      • Offerize your App - 1504020506
      • Using the Android Job Scheduler - 1504020504
      • From Holo to Material - 1504020526
      • Under the Hood of Android Auto - 1504020501
      • Isolation for Android App Developers - 1504020498
      • Android Work - 1504010496
      • ExoPlayer: Adaptive video streaming on Android - 1504010489
      • Sample rates and resampling: Why can't we all just agree? - 1504010488
      • Drive Android API - 1504010485
    • Android Studio - 004
      • Layout Editor (Ep 3, Android Studio) - 1503290479
      • Introducing Gradle (Ep 2, Android Studio) - 1503170426
    • I/O 2014 Android 分发主题 - 091
      • Introduction to Google Play - 1504030534
      • Google Play: building your user community - 1504030535
      • Optimizing Apps for Education - 1504030536
      • Succeeding in Education Technology - 1504030530
      • Subscriptions Made Easy with Google Play - 1504030531
      • The world is your playground - go global with Google - 1504030533
      • Maximizing discoverability on Google Play - 1504030538
    • Android Auto - 003
      • Introduction to Android Auto - 1504130615
      • Android Auto Messaging - 1504130617
      • Android Auto Audio - 1504130616
    • Android Wear - 006
      • Designing for Android Wear - 1503210448
      • How We Customized Google Apps for Android Wear - 1503210450
      • Fullscreen apps for Android Wear - 1503210445
      • New Notification Features for Android Wear - 1503210446
      • Building Cloud-powered wearable Apps - 1503210449
      • An Introduction to Android Wear - 1503190435
      • Google I/O 2014 - Android Wear: The developer's perspective - 1503210442
      • Devoxx 2014 Interviews: Android Wear - 1503210440
      • DevBytes: Watch Faces for Android Wear - 1503210439
    • Android TV - 005
      • Using the Leanback library - 1504080588
      • Beach Buggy Racing Multiplayer with Nearby Connections (Play Services) - 1503060387
    • Android for Work - 106
      • Android for Work for Developers - 1503060390
      • App Configurations, Testing and Launchers - 1504110590
    • IO Bytes 2014 - Android - 066
      • Chrome Apps on Android and iOS - 1501080014
      • Perf Primer CPU, GPU and your Android game - 1501080017
  • Chrome 平台
    • IO Bytes 2014 - Chrome and Web - 067
      • Using the PageSpeed API - 1505070815
      • Fabulous Forms for the multi-device web - 1505070816
      • Testing multi-screen web pages - 1505070817
      • Responsive images today - 1505070819
      • Web Performance Testing at YouTube - 1505070828
      • Building sites for the multi-device web - 1505070820
      • Deep dive: Google Cloud Messaging for Chrome - 1505070827
  • Google 创业者资源
    • Coffee with a Googler - 012
      • Chat with Allen Huang of AndroidTV - 1503040384
      • Chat with Fred Chung about developer advocacy - 1503070395
      • Google Fit platform with Michelle Haq - 1503210443
      • Android Auto Product Manager Andrew Brenner - 1501120027
      • Chat with Francis Ma about Google Play services - 1501120028
    • Root Access For Startups - 077
      • What we learned building plug-ins for Android, with startup Magnet - 1503230453
      • How to use crowdfunding to your advantage, with startup Hale Devices - 1503280462
      • How to overcome customer objections when selling tech, with startup Guesswork - 1503280458
    • First Things First - 029
      • Getting started with Android: A crash-course in developing for Android - 1504120601
      • How to ask a question: conducting research for your startup - 1504120603
      • MVP Design Hacks: transform your hot idea into a validated prototype - 1504120602
      • Build something people want: Solving real problems - 1504120605
    • How I - 061
      • Use BigQuery to find my most valuable customers - 1504070573
      • Manage beta testing communities using Google Play - 1504070572
      • Use paper wireframing to build native prototypes - 1504070570
      • Used social media and $0 marketing to get 68 million users - 1504070568
      • Prep to fundraise with four questions - 1504070564
      • Validated my idea in 2 days (with no code) - 1504070562
      • Build open platforms on Android - 1504120596
      • Get cheap, automatic analytics for my business using BigQuery - 1504070571
      • Write press releases to get international media coverage - 1504070569
      • Test beta-product features using Google Apps - 1504070563
      • Use URL builder to measure ROI on social media - 1504070561
      • Use events to build DeadSocial's brand - 1504070557
      • Use BigQuery to visualize streaming data - 1503220452
      • Find, screen, and hire developers - 1503120406
      • Drive engagement with social challenges - 1504070558
  • 设计
    • DesignBytes - 017
      • Paper and Ink: The Materials that Matter - 1505050793
  • 云计算
    • DevBytes: Google Cloud Platform - 021
      • Powering the next killer app with the Google Cloud Platform - 1504210672
      • Introduction to Google Cloud Endpoints - 1504210675
      • The Beauty of Scale with Google Cloud Platform - 1504210678
    • Google Cloud Platform - Big Data - 105
      • GDELT & BigQuery: Understand the world - 1502200379
    • Uncategorized - 999
      • Introducing Google Cloud Platform Resources - 1501190370
  • Google 应用开发
    • Launchpad Online - 072
      • The Setup: Creating new apps using Google APIs - 1503190428
      • Listing your files in Google Drive - 1503190429
      • Customizing Google Analytics for your startup - 1503290473
      • The Launchpad Online series - 1503190427
      • Getting started with Google Analytics - 1503290472
      • Accessing Google Maps from a spreadsheet?!? - 1502220381
      • Change the world in 10 lines of code - 1503080398
    • Google Play Services - 054
      • Google Play services 6.1 - 1503290481
      • Google Play Services 7.0 - 1503200437
      • Google Play Services 6.5 - 1501080015
    • 谷歌地图 iOS SDK - 053
      • Maps Live: New Features in the Google Maps Mobile APIs for Android and iOS - 1504300777
    • Google 移动搜索开发 - 055
      • Is your app in the Google index? - 1504120598
      • Get more engaged users with Google Search for Developers - 1503070397
    • DevBytes: Google Cast - 020
      • Google Cast SDK for Android - 1504180666
      • Media Router Framework - Part 1 - Media Router API - 1504180667
      • Overview for Google Cast Receivers - 1504180664
      • Google Cast SDK for iOS - 1504180663
    • Getting Started with the Google Maps SDK for iOS - 035
      • Getting started with the Google Maps SDK for iOS, Part 1 - 1504270757
    • IO Bytes 2014 - Wearables - 070
      • Voice Driven GDK Glassware - 1505280836
    • Route 85 - 078
      • Introducing Route 85 - 1501120022
      • Quick Tip: Don't Default that Switch! - 1501190371
      • OpenInChrome on iOS, Part 1 - 1501120023
      • OpenInChrome on iOS, Part 2 - 1501120024
      • OpenInChrome on iOS, Part 3 - 1501120025
      • OpenInChrome on iOS, Part 4 - 1501120026
    • DevBytes 2014 - 019
      • Web Components - Template - 1505040789
      • Wearable DataLayer API - 1505050792
      • Using srcset for responsive images - 1505050790
      • The picture element for art direction - 1505050791
    • Uncategorized - 999
      • Sun Surveyor brings augmented reality to photographers using Google Maps APIs - 1504200668
      • Snappy travels with the Roads API - 1503060392
      • Easy Maps Apps in Java and Python - 1501140030
  • Google 广告平台
  • Polymer
    • Polycasts - 076
      • The Awesome Power of Auto-Binding Templates -- Polycasts #08 - 1502220382
      • Content Switcheroo with Core-Pages -- Polycasts #09 - 1502200380
      • Core Iconset -- Polycasts #02 - 1505040788
  • Web 平台
    • HTTP 203 - 062
      • Gotchas - 1501140368
      • Font Rendering - 1501080016
    • Web Components - 081
      • DevBytes: Web Components - Overview - 1504250709
  • 宣传视频
    • Uncategorized - 999
      • Google Developers - 1501150369
      • I/O Extended 2014 - Join me - 1502220383
  • Google 各类开发者会议
    • 2014 Chrome 开发者高峰会议 - 009
      • Keynote - Chrome Dev Summit 2014 (Darin Fisher) - 1503120407
      • TLS All the Things! - Security with Performance(Chris Palmer) - 1503140412
      • Let’s build some apps with Polymer!(Rob Dodson) - 1503150415
      • Day One Closing Remarks(Sundar Pichai) - 1503150417
      • Chrome Leadership panel - 1503160422
      • Fundamentals of Mobile Web Development(Matt Gaunt) - 1503150416
    • 2015 游戏开发者大会中 - 039
      • FlatBuffers - 1504150640
      • Games for Google Cast - 1504150637
      • Top 10 Things Android Game Developers Should Know v 3.0 - 1504150643
      • Automate Publishing for Google Play APIs - 1504150639
      • 3 Game Design Mistakes You're Making - 1504150636
      • Android TV - 1504150638
      • How to Go Viral Without Really Trying - 1504150641
    • Devoxx 2014 Interviews - 024
      • What's new in Android 5.0 Lollipop - 1504260740
      • Android Tools - 1504260743
      • BigQuery and user-defined functions - 1504260744
    • IO Bytes 2014 - 065
      • Dart in Google Cloud - 1505070810
      • Big genomic data on Google Cloud Platform - 1505070811
      • Easy International Checkout with Chrome - 1505070802
      • Google developer tools and APIs for iOS - 1503190436
      • Whet your appetite with IO Bytes - 1501080021
    • PlayTime@Shanghai - 095
      • 主题演讲 Chris Yerga - 1504060549
      • 如何成功地开发你的应用 Ellie Powers - 1504060550
      • 在Google上营利 Brahim Elbouchikhi - 1504060551
      • Playtime Shanghai event sizzle reel - 1504070552
    • Project Google I/O 2015 - 098
      • Project Tango Mobile 3D tracking and perception - 1506120857
      • Democratizing Education - 1506120868
      • Improve your Android app’s accessibility - 1506120864
      • Google Cloud Messaging 3.0 - 1506120844
      • Developers connecting the world through Google Play - 1506120862
  • 开源开放技术
    • Compressor Head - 013
      • The Trailer, Season 2 - 1503060385
      • Behind the Scenes - 1503210441
      • Arithmetic Compression (Ep 5, Compressor Head) Google - 1503070394
      • Introducing Compressor Head - 1502120372
      • Episode 1 (Variable Length Codes) - 1502120373
      • Episode 2 (The LZ77 Compression Family) - 1502120374
      • Episode 3 (Markov Chain Compression) - 1502120375
Powered by GitBook
On this page
  • 译者信息
  • 解说词中文版:

Was this helpful?

  1. 开源开放技术
  2. Compressor Head - 013

Arithmetic Compression (Ep 5, Compressor Head) Google - 1503070394

PreviousBehind the Scenes - 1503210441NextIntroducing Compressor Head - 1502120372

Last updated 5 years ago

Was this helpful?

视频发布时间

2015年3月6日

视频介绍

Arithmetic compression represents the current dominant form of statistical compressor for most common data types: JPG, MPEG, LZMA, BZIP, WEBM, WEBP etc. It's wide range of use is dominantly because of it's un-rivaled ability to encode data as close to entropy as possible, without bloat. But what's not understood by most developers, is how Arithmetic Compression actually achieves this result. Most public descriptions are mired in technical details of the transform, but don't actually describe the statistical reasoning for the compression savings. Well, Fear not, because +Colt McAnlis walks through the core concept, and how all the crazy math produces one amazing compression algorithm in this episode of Compressor Head.

视频推介语

暂无,待补充。

译者信息

翻译

润稿

终审

原始链接

中文字幕

翻译流水号

加入字幕组

Chris

lch

程路

1503070394

解说词中文版:

Colt Mcanlis: 在压缩的神秘世界里

有一种算法总是能够难到开发者

这种算法的优秀的压缩能力

得益于统计概率的伟大力量

当然 我所说的算术压缩

是一种在现代压缩技术中无处不在的

真正的统计学上的

压缩算法

你在互联网上看到的一切事物 从图片到视频 甚至是

你的文本数据 都已经

被这种算法处理过了

自己写一个算法可不是一件轻松的事儿

这要求你要凝视着一副陌生的面孔

并且接受它告诉你的一切

但是 请不要恐惧 年轻的程序员们 因为我会帮助你们

我叫Colt McAnlis 这里是Compressor Head

现在 如果你还记得的话 变长编码

简称VLCs 在输入流中占据一个特定的符号

并且给它分配一个

比特位数可变的密钥

那段VLC接着就被送到输出流当中

这样 就得到了压缩之后的数据

这里的关键是变长编码

将实现接近于信息熵的压缩

只需要符号分布的概率

和你用来构建VLC的概率表

相匹配

但是关键在于这些VLC是随着计算机中

一组特定的概率产生的

例如 呃 在这里

让我们看一下Omega的编码和旁边Rodeh的编码

如你所见 对于这两种类型的VLC

它们的每一个n所给的值都不一样

这是因为他们所假设的

统计概率不同

看 Omega的编码显示了不可能有

一大堆的最有可能的符号

如果我们以很多的

概率相近的或者相同的符号结尾

那么我们将陷入麻烦

Omega的编码偏重于由一个主要的符号占据最大的概率

而其他一切符号

则减小到一个非常小的值

而另一方面 Rodeh的编码

显示了最靠前的4个符号

在概率上非常非常接近

但是一旦碰到第八个最大概率的符号

你就会发现编码字符的大小开始急剧的增长

这意味着有一组

概率非常接近的并且此消彼长的符号

因此 你将会遇到一个问题

如果你的数据流的概率的分布

和你选的VLC集不匹配怎么办

那么 在这种情况下 你将会陷入一团糟

你将不能以最小的编码字符结尾

而且 这样以来 你压缩的数据流

也将不会和信息熵相等

这是大多数人

在实践变长编码的时候

所遇到的困难

给我们的数据使用什么样的VLC

才能得到最好的压缩结果呢

我的意思是 我们并不能通过迭代每一个VLC

来找到最好的结果

我的意思是 那只会让我们浪费更多的时间

相反 我们需要一些方法

来编码一个优化可能出现的概率表的数据流

而不是去满足一些已经存在的概率表

朋友们 这就是算术压缩

存在的意义

Jorma Rissanen 即将出版

大多数讨论算术压缩的文献

是这么表述的

[清嗓子]

(模仿书中的语气)比起给每一个符号分配一个编码字符的VLC

算术压缩给整个数据流

分配一个编码字符

这些是很优雅的说法 但是

并没有告诉我们任何有用的信息

我的意思是 这些文献里并没有告诉我们哪种编码

应该被用于我们的数据流中

如果我的输入是AZZ 我可以挑选任意数字

我的意思是 如果我选了12626 这很酷 对吧

但是那会导致数据流膨胀

或者我可以让AZZ等于1 但是这样的话

那我以后又该怎么解压缩

看 算术压缩的魔力就是

实现一种数据转换 这种转换被应用于源数据

目的是为了产生一些单一的

并且比源数据流占用更少比特位的数字

但是 我们先不要太超出自己的能力

首先 让我们来聊一聊折半搜索

我是 我是 完整的 还是不完整的

假如说 我要从数字0-9中搜索出6

折半搜索的工作原理就是把所有数分为两半

并且重复执行 直到找到我们所要查找的数

很快 我们这里最小的数是0

最大的数是9 因此 我们要找的中间数

就是5

现在 因为6比5大 那么我们就去掉小的一部分

然后现在最小的数就是5

而我们要找的中间数就是7

接下来 我们在每次迭代过程中继续这种对半分的过程

直到我们

找到我们想要的数字

但是现在的问题是

如果在每次迭代中不是对半分整个范围内的数

而是分成3份 4份 甚至16份呢

例如 让我们把数字空间分为4份

然后当我们选择了我们想要的那一块的时候

我们把它再分为4份

这个概念所对应的

不断划分空间并进行搜索

就是压缩算法工作的基础

我们给我们的每一个符号

划分一个子空间

当我们从我们的输入数据流编码符号C的时候

我们进一步分割C的空间 按正确的顺序

分配新的符号到该空间

并且持续这个过程

我们把获得的每个单个的输入

一步步划分成更小的部分

却只需要做出简单的修改

相对于把搜索范围分成几等分

我们则是根据

在数据流中出现符号的概率

这有点像我们的码字表

因此 如果C是概率最大的符号 那么它就获得最大的空间

现在 为了做这些工作 我们需要让我们的数的范围

变得更有意义以便被真正的划分

所以 我的意思是我们不能再使用整数了

相反 我们将细分我们范围内的数

并且定义它所在的范围是0到1

然后 这就使得我们可以给每一个符号

分配一段在字符区间上的等于它自己概率的长度的区域

朋友们 从这里开始

算术压缩就开始了

但这已经足够说一阵儿了

让我们来动手做一做

让我们用R G B这三个符号来举例

它们各自的概率分别是0.4 0.5和0.1

现在 根据这些给定的概率

去给它们在0到1上分配相应的区间是很简单的

或者 有一种方式呈现的更加直观

条形统计图

让我们来编码一个简单的字符串 GGB

首先 我们从输入流中取出符号G

然后 因为根据我们的概率表 G的范围是0.4-0.9

然后我们来给它划分空间

现在 我们得到了0.4-0.9之间的值

这样又得到了我们区间的最小值和最大值

即从0.4到0.59999

G最终的范围是0.6-0.84999999

B最终的范围是0.85-0.999999

现在是时候从我们的输入流中读取第二个符号了

它又是G

当我们读取B的时候 我们会再一次像那样

来划分区间

当编码完B的时候 我们最终的范围确定在0.825-0.85

这个区间就是我们最终要作为编码后的值放到输出流当中去的

现在 恭喜你

你刚才已经真正的使用压缩算法

编码了一个数据流了

现在 解码可以被看成是一个同样的过程

只是顺序反过来了而已

现在 因为我们的最终值的范围是0.825-0.85

老实说 我们现在可以把任何值放到这个范围中

来编码我们的数据流

现在让我们来随机挑选一个值 那么就0.83了

解码的过程可以被想象成

通过我们细分的范围画一条竖直的线

当我们前进的时候更新间隔

因此 如果我们以0.83开始

落在那个范围里的符号就是G

所以我们把它作为我们的第一个符号输出

然后我们再分那个空间

然后0.83又一次到了B的空间

这是我们的第二个符号

最终0.83到了B的范围里

这是我们的最后一个符号

这下你懂了吧 算术压缩的编码和解码

都已经打包教给你了

[播放音乐]

我看上去好吗

记得这家伙吗

除了发明多变长编码模式之外

Peter Elias首次在20世纪60年代早期

提出了算术压缩背后的概念

直到10年后

Jorma Rissanen 首次发表了一些关于符号的

的研究成果 并且随之而来的还有巨大的专利

在接下来的20年里

因为IBM执行的气势汹汹的专利战略的缘故

算术压缩几乎没有任何发展

专利问题如此气势汹汹

而算术压缩又确实非常好用

因此 一种分离出来的编码算法 也就是区间编码

在1979年诞生了

这种算法基本上就是和算术压缩做了同样的事

然而并没有受专利的影响

这种扼杀创造力的制度

一点也不好 对吧

(“开门 查水表!”)

嗯

你知道 我真的认为这一切

都不是必要的

我的意思是 这只是一段视频上的一个评价

我们得到了什么吗

我们得到又一个授权了吗

好吧

我简直不知道在说什么

签名字

你们 当然 同样要签字

说真的 我认为

Eula Frumpkins:还有这里

Colt mcanlis:你们还需要血样 毛发

和其他的东西吗

Eula Frumpkins:只需要签字就好了

Colt mcanlis:好吧 好吧

听着 我很忙的

我可以回到我的我的岗位了吗

Eula Frumpkins:让我检查一下

Colt mcanlis:你要检查所有的吗

好的 谢谢

Eula Frumpkins:谢谢配合

Colt mcanlis:在21世纪初

专利失效了

然后算术压缩再次飞黄腾达了

使得它成为

现代统计编码方法

的金科玉律

事实上 如今的大多数压缩包的格式

比如 LZMA BZIP

声音和视频 例如JPEG WEBM和H.264

所有这些都基于算术压缩系统

作为其统计压缩的一步

因此 有了算术压缩的技术 这是比较棘手的部分

它的工作原理到底是什么

我的意思是 它的概念很简单 但是

它到底是怎么接近信息熵的

好吧 这就要从我们对概率 分布

和我们细分空间时做的每一件是说起了

让我们来尝试均匀的细分我们的空间

如果我们有10个值 并且在0.2到0.3之间细分我们的空间

那么我们就会得到10个新的范围 每一个范围以这些数开始

0.27, 0.28, 和 0.29.

看一看会发生什么

通过细分空间

我们的范围值已经增加了一位数

如果我们就此打住

那么我们所有的输出都会是两位数的长度

如果我们对其中的任何一个再次细分

最终每个范围将会成为3位数

而且 如果我们继续细分

最终每个范围将会成为4位数 甚至更多

可以帮个忙吗 让我们快点把它翻过来吧

非常棒

非常感谢你

好的

现在 让我们不平均分这个空间

并且 只是为了论证一下

就取这个空间的9/10这个范围

现在我们得到的范围是以下面的数开始 0.2, 0.291, 0.292,

0.293, 0.294, 0.295, 0.296, 0.297, 0.298, 和 0.299.

现在 看仔细了

每次我们在第一个范围中 也就是0.2-0.291

我们将能输出更少的位数到输出流中

最好的是 我们可以轻松的使用0.2这个下限

这个数小于我们范围内

任何其他的起始数值

并且 我们最终根本不会将任何新的位数

引入到我们的输出编码中

即使我们深入到这个二叉树的第10024层

选出它的第一个范围也会输出更少位的数

到我们输出流中 并且 在最佳情况下

根本不会产生任何新的数

这种基于符号概率的单位空间偏移量的思想

使得让算术压缩

成为统计学的压缩算法的核心

更有效的是 符号的概率越多

输出到编码的数字越少

当一切尘埃落定的时候

算术压缩可以不断的接近任意数据流的信息熵

不论数据类型

和符号分布的概率

这种专注让算术压缩好像是

统计压缩的一把瑞士军刀

但是 在压缩程序员之中

有关哈夫曼和算术压缩之间

存在着巨大的争论

一些人宣称 哈夫曼国王已逝 算术压缩永存

而同时 其他一些真正的信徒则宣称

哈夫曼压缩依然不过时且很好用

只不过是衍生成了另一个名字 动态哈夫曼编码

但是这又是另一个不同的故事了

我是Colt McAnlis

感谢您的观看

Youtube
Youtube
加入 GDG 字幕组
video_screenshot