# BasicHeader

class BasicHeader(val chunkType: ChunkType, val chunkStreamId: Int)

Created by pedro on 21/04/21.

cs id (6 bits) fmt (2 bits) cs id - 64 (8 or 16 bits)

0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ |fmt| cs id | +-+-+-+-+-+-+-+-+ Chunk basic header 1

Chunk stream IDs 64-319 can be encoded in the 2-byte form of the header. ID is computed as (the second byte + 64).

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |fmt| 0 | cs id - 64 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Chunk basic header 2

Chunk stream IDs 64-65599 can be encoded in the 3-byte version of this field. ID is computed as ((the third byte)*256 + (the second byte) + 64).

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |fmt| 1 | cs id - 64 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Chunk basic header 3

## Constructors

BasicHeader
Link copied to clipboard
constructor(chunkType: ChunkType, chunkStreamId: Int)

## Types

Companion
Link copied to clipboard
object Companion

## Properties

chunkStreamId
Link copied to clipboard
val chunkStreamId: Int
chunkType
Link copied to clipboard
val chunkType: ChunkType

## Functions

getHeaderSize
Link copied to clipboard
fun getHeaderSize(timestamp: Int): Int
toString
Link copied to clipboard
open override fun toString(): String