You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: chunk1.go
    path of file: ./repos/mediamtx/internal/protocols/rtmp/chunk
    
    the code of the file until where you have to start completion: package chunk

import (
	"io"
)

// Chunk1 is a type 1 chunk.
// The message stream ID is not
// included; this chunk takes the same stream ID as the preceding chunk.
// Streams with variable-sized messages (for example, many video
// formats) SHOULD use this format for
    
func (c Chunk1) Marshal(_ bool) ([]byte, error) {
	buf := make([]byte, c.marshalSize())
	buf[0] = 1<<6 | c.ChunkStreamID

	if c.TimestampDelta >= 0xFFFFFF {
		buf[1] = 0xFF
		buf[2] = 0xFF
		buf[3] = 0xFF
		buf[4] = byte(c.BodyLen >> 16)
		buf[5] = byte(c.BodyLen >> 8)
		buf[6] = byte(c.BodyLen)
		buf[7] = c.Type
		buf[8] = byte(c.TimestampDelta >> 24)
		buf[9] = byte(c.TimestampDelta >> 16)
		buf[10] = byte(c.TimestampDelta >> 8)
		buf[11] = byte(c.TimestampDelta)
		copy(buf[12:], c.Body)
	} else {
		buf[1] = byte(c.TimestampDelta >> 16)
		buf[2] = byte(c.TimestampDelta >> 8)
		buf[3] = byte(c.TimestampDelta)
		buf[4] = byte(c.BodyLen >> 16)
		buf[5] = byte(c.BodyLen >> 8)
		buf[6] = byte(c.BodyLen)
		buf[7] = c.Type
		copy(buf[8:], c.Body)
	}

	return buf, nil
}