Chapter 4 Flashcards

1
Q

Most common encoding standard?

A

ASCII

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the problem with unicode?

A

All devices that were built before unicode couldnt communicate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does one specify which charsets to use?

A

Accept-Charset: iso-8859-1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you show how many octets there will be in a UTF encoding string

A

0 = lower 7 bits represent the character
10 = continuation character
110 = 1 octet will follow
1110 = 2 octets will follow
11110
111110
1111110
1111110

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the limit of bytes per character in UTF-8?

A

4 bytes per character

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is mean by “UTF-8 is self synchronising”?

A

If there is a mistake skip over all of the 10 starting octets and go to a 0 or 11* octet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does *;q=0.1 mean in Accept-Charset?

A
  • = wildcard. q = quality(preference)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the 3 basic constructor types in ASN.1?

A

CHOICE, SEQUENCE, SET

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In what representation are X.509 certificates defined?

A

ASN.1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Whats the difference between XML and ASN.1

A

ASN.1 provides abstract description of what the data looks like.

ASN.1 is more compact ( thus less resource intensive )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which is easier to inspect, ASN.1 or XML and why?

A

XML because ASN.1 message may contain binary data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does ASN provide in terms of the message to be sent?

A

It provides an abstraction of the message

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does BER use as a type descriptor at the start of any value?

A

A octet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

SOAP is a ……….. representation

A

application oriented

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What representation is used for web services?

A

WSDL ( Web service description language )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

When does the presentation layers negotiate which representation to use?

A

Before the actual data is sent

17
Q

What does MIME data consist of?

A

Header and payload

18
Q

What are the 2 important headers for MIME?

A

Content-Type
Content-Transfer-Encoding

19
Q

What are the MIME types?

A

application
Audio
example
image
message
model
multipart ( composite payloads)
Text
video

20
Q

How do you specify which character set to use in MIME?

21
Q

Is the data represented by the presentation layer already encoded?

22
Q

What is the mime type for audio/music?

A

audio/mpeg

23
Q

Whats the problem with universal formats?

A

Should it have minimal/ most common features or a truly universal format.

24
Q

Problems with data exchange?

A

Formats ( interoperability)
Large datasets migration
integrity

25
Q

How can we solve data exchange challenges?

A

Use container formats.
Use data serialization.
Interchange formats (ASN XML)

26
Q

What is the difference between lossy and loss less compressions?

A

Lossy = looses some info during compression
Lossless

27
Q

On what level does compression happen?

28
Q

What is run length encoding?

A

Shortening “runs” by compressing it

29
Q

Example of RLE ( Run length encoding with characters)
Ng[[[[[[[[[[[[[[[[[[[[[[[[[[[[

A

Ng[[[[[[[[[[[[[[[[[[[[[[[[[[[[
(N,G,”<ESC>",28,[)</ESC>

No “</ESC” but for some reason this puts it there

30
Q

(N,G,<ESC>,28,[) What is <ESC></ESC></ESC>

A

A character to denote that a run will occur

31
Q

Steps of bit-based RLE

A

1: count consecutive bits (assuming starting with 0) (if there are no 0;s == 0
2: Encode run lengths

32
Q

Bit-based RLE Example:

Original: 000011100000111000000

A

Original: 000011100000111000000

1: 4,3,5,3,6
2: 0100(4) 0011(3) 0101(5) 0011(3) 0110(6)

33
Q

How does Lempel-Ziv compression work?

A

Replace repeated patterns with shorter codes. Computational complexity may play a factor

34
Q

Watch video on Huffman codes

35
Q

What is the main idea behind huffman codes?

A

Most used characters = shortest code

36
Q

How do we construct a huffman tree?

A

1: Treat each letter as a single node tree.
2: Join 2 trees at a time until only 1 left
3: combine the 2 trees that are used least frequently

37
Q

Is huffman code self-synchronising?

38
Q

Why is the lower layer we usually could encrypt at level 2 and not layer 1?

A

Cause layer 1 doesnt add any headers.

39
Q

What is the problem with link encryption? ( Layer 2 encryption)

A

Youd have to decrypt at every single node