1
00:00:00,199 --> 00:00:07,879
anyone who's ever had to pack for a trip has probably known the frustration of

2
00:00:04,960 --> 00:00:13,040
trying to cram almost a suitcase worth of stuff into a backpack I mean sure we

3
00:00:11,240 --> 00:00:18,199
could suck it up and leave a few items behind or haul around our bulky luggage

4
00:00:15,920 --> 00:00:22,600
with us if they're so important but if we did that then our bag won't fit in

5
00:00:20,320 --> 00:00:26,760
the overhead compartment anyway and all we're trying to bring is a few extra

6
00:00:24,599 --> 00:00:32,320
pairs of underwear just in case we eat some bad tandoori chicken well that got

7
00:00:30,759 --> 00:00:37,200
gross but other than that was pretty much a perfect analogy for why data

8
00:00:34,320 --> 00:00:41,520
compression became so important to reduce storage requirements and to

9
00:00:39,440 --> 00:00:46,760
improve transfer speeds over standard connections these packaging services are

10
00:00:44,280 --> 00:00:52,680
kind of like our roommate who catches us standing on our bag trying to zip it up

11
00:00:48,840 --> 00:00:54,480
and says you know you uh can just roll

12
00:00:52,680 --> 00:00:58,039
your laundry and save like a ton of space right and as it turns out when we

13
00:00:56,520 --> 00:01:03,000
try it for ourselves the smug little turd is right not only does all of our

14
00:01:00,480 --> 00:01:06,799
stuff now fit but we even have more room to cram with stuff we'll never use like

15
00:01:05,000 --> 00:01:11,360
that copy of ET the Extraterrestrial that we definitely don't watch every

16
00:01:08,280 --> 00:01:13,240
night and cry back on topic obviously

17
00:01:11,360 --> 00:01:17,400
data can't be rolled in quite the same manner as slightly pre-worn laundry so

18
00:01:15,320 --> 00:01:21,600
coding Engineers devise algorithms capable of breaking down longer strings

19
00:01:19,720 --> 00:01:25,520
of data into shorter ones then reassembling them later using what

20
00:01:23,560 --> 00:01:32,560
they've retained an easy way to describe this would be like breaking down the

21
00:01:27,799 --> 00:01:34,360
equation 2 * 2 * 2 2 * 2 * 2 into 2 to

22
00:01:32,560 --> 00:01:39,159
the 5th power which is much faster to write and simpler to articulate but lus

23
00:01:37,360 --> 00:01:43,399
I actually know a thing or two about coding and uh one of those things is

24
00:01:41,320 --> 00:01:46,880
that the use of exponential symbols is simply not possible well first off

25
00:01:45,600 --> 00:01:51,360
thankfully we weren't roommates in college I mean talk about smug second

26
00:01:49,200 --> 00:01:55,439
you're correct as well while it is possible to write a command string which

27
00:01:53,520 --> 00:01:59,479
describes an exponential function it usually isn't much of a space saver so

28
00:01:57,759 --> 00:02:03,560
maybe a better way to demonstrate how a compress algorithm works is to use

29
00:02:01,680 --> 00:02:07,560
something like a string of x's and o's or zeros and ones if you're catching the

30
00:02:06,000 --> 00:02:13,040
similarities here let's say we have a string of eight digits which is spelled

31
00:02:09,160 --> 00:02:15,040
out as XXX o XXX now an algorithm may

32
00:02:13,040 --> 00:02:18,400
look at this and decide that every time it comes across a new digit it will

33
00:02:16,800 --> 00:02:21,879
replicate it and then note how many times it's been repeated this would

34
00:02:20,040 --> 00:02:28,800
cause our string to transform into the smaller x302 X3 while this did reduce

35
00:02:26,120 --> 00:02:32,959
overall size it only managed to do so by 25% which which isn't exactly going to

36
00:02:30,959 --> 00:02:37,160
allow us to cram our drives full or transfer large files over the Internet

37
00:02:35,239 --> 00:02:41,360
more efficiently that's where more specifically designed algorithms will

38
00:02:39,200 --> 00:02:46,560
come in to strip the code to its most basic form instead simply adding all the

39
00:02:44,400 --> 00:02:51,840
X's together by treating each as a value of one then listing all the O's followed

40
00:02:49,000 --> 00:02:56,040
with a digit count as before then we end up with a string that would look like

41
00:02:53,519 --> 00:03:00,840
3023 which we can now see as half the size of the original code now obviously

42
00:02:58,360 --> 00:03:05,319
this example is rudimentary at best but it gives an idea of how mathematicians

43
00:03:03,000 --> 00:03:10,159
are able to achieve and then further improve upon this feat as time goes on

44
00:03:07,400 --> 00:03:16,239
now this example would be known as lossless compression all of the original

45
00:03:12,760 --> 00:03:19,440
data remains intact and is a requirement

46
00:03:16,239 --> 00:03:21,560
for programs or documents but if you're

47
00:03:19,440 --> 00:03:26,200
willing to give up some detail in the original file lossy compression

48
00:03:24,159 --> 00:03:30,480
algorithms can be used for media files like music and movies as long as you

49
00:03:28,560 --> 00:03:33,760
understand that the tighter you cram it the lower the playback quality you'll

50
00:03:32,519 --> 00:03:38,519
experience which you can actually learn a little bit more about here in our

51
00:03:35,799 --> 00:03:43,640
video specifically about video compression speaking of compression no

52
00:03:42,080 --> 00:03:48,239
no not compression okay whatever we've got a new sponsor today on Techquickie

53
00:03:45,360 --> 00:03:52,159
freshbooks it's a cloud Accounting Service and basically the kind of thing

54
00:03:50,080 --> 00:03:56,680
that any freelance worker or small business is going to want to know about

55
00:03:54,879 --> 00:04:00,360
it's all about making your life easier when it comes to invoicing getting paid

56
00:03:58,840 --> 00:04:05,159
and tracking expens expenses because it's done online it makes invoicing

57
00:04:03,040 --> 00:04:08,959
simple your clients can pay you online your expenses are automatically tracked

58
00:04:06,959 --> 00:04:12,840
as you spend and all the little details about cash flow are all in one place so

59
00:04:10,760 --> 00:04:15,680
you know exactly where you stand and it shows a full history of every invoice

60
00:04:14,439 --> 00:04:20,320
and allows you to check if your client has viewed the invoice and all kinds of cool stuff like that you can even update

61
00:04:18,560 --> 00:04:24,479
your freshbooks time sheet from your phone and pull project hours right into

62
00:04:22,400 --> 00:04:27,960
an invoice so you can send that off so you get paid if you're Your Own Boss you

63
00:04:26,600 --> 00:04:31,960
should be using stuff that makes you feel like a boss and fresh books is an

64
00:04:29,960 --> 00:04:35,560
incredibly easy way of doing all of your billing online so you'll have more time

65
00:04:33,759 --> 00:04:39,080
to do the work you actually want to be doing or maybe you don't want to be

66
00:04:37,360 --> 00:04:43,120
doing it maybe you just need to do it to eat or whatever the case may be to do

67
00:04:41,000 --> 00:04:46,759
your work head over to freshbooks.com tequ and don't forget to enter

68
00:04:45,160 --> 00:04:52,960
techquickie in the how did You Hear About Us section because that's

69
00:04:50,840 --> 00:04:55,880
important all right thanks guys for watching this video like it if you liked

70
00:04:54,560 --> 00:04:59,240
it dislike it if you thought it sucked check out our other channels Linus Tech

71
00:04:57,560 --> 00:05:03,600
tips and Channel Super Fun where we do super fun stuff comment on the video

72
00:05:01,600 --> 00:05:07,880
with suggestions for future videos and as always don't forget to subscribe slf

73
00:05:06,600 --> 00:05:12,039
follow and all that good stuff if you want to see more videos just like this

74
00:05:09,680 --> 00:05:12,039
one
