> For the complete documentation index, see [llms.txt](https://hochan049.gitbook.io/cs-interview/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hochan049.gitbook.io/cs-interview/web/rfc-7320/4.-transfer-codings.md).

# 4. Transfer codings

전송 코딩(Transfer coding) 이름은 네트워크를 통해 "safe transport" 을 보장하기 위해 페이 로드 본문에 적용 되었거나 적용되어야 하거나 적용되어야 할 수 있는 인코딩 변환을 나타내는 데 사용된다. 이는 전송 코딩이 전송되는 표현의 속성이 아니라 메시지의 속성이라는 점에서 내용 코딩과 다르다.

transfer-coding = "chunked" ; Section 4.1\
&#x20;                            / "compress" ; Section 4.2.1 \
&#x20;                            / "deflate" ; Section 4.2.2\
&#x20;                            / "gzip" ; Section 4.2.3\
&#x20;                            / transfer-extension

transfer-extension = token \*( OWS ";" OWS transfer-parameter )\
transfer-parameter = token BWS "=" BWS ( token / quoted-string )

모든 transfer-coding 이름은 대소문자를 구분하지 않으며 Section 8.4에 정의된 HTTP Transfer Coding registry에 등록해야 한다.

#### 4.1 Chunked Transfer Coding

* 수신자는 청크 분할 전송 코딩을 반드시 구문 분석하고 디코딩 할 수 있어야 한다.(MUST)

#### 4.1.1 Chunk Extensions

* 수신자는 인식할 수 없는 청크 확장자를 무시해야 한다.(MUST)

#### 4.1.2 Chunked Trailer Part

* 발신자는 메시지 프레이밍에 필요한 필드(e.g., Transfer-Encoding 과 Content-Length), 라 우팅 (e.g., Host), 요청 수정자 (e.g., \[RFC7231]의 Section 5 제어와 조건부), 권한 (e.g., \[RFC7235]와 \[RFC6265]를 봐라), 응답 제어 데이터 (e.g., \[RFC7231]의 Section 7.1) 또 는 페이로드 처리를 어떻게 결정하는 지 (e.g., Content-Encoding, Content-Type, Content-Range과 Trailer)를 포함하는 트레일러를 생성해서는 안 된다.(MUST NOT)

#### 4.1.3 Decoding Chunked

#### 4.2 Compression Codings

#### 4.2.1 Compress Coding

* “compress” 코딩은 공통적으로 유닉스 파일 압축 프로그램 “compress”로 생산된 Lempel-Ziv-Welch (LZW) 코딩이다. 수신자는 “x-comress”를 “compress”로 동등하게 간주해야 한다.(SHOULD)

#### 4.2.2 Deflate Coding

“deflate” 코딩은 Lempel-Ziv (LZ77) 압축 알고리즘과 허프만 코딩을 결합하여 사용하는 “deflate” 압축 데이터 스트림을 포함하는 “zlib” 데이터 포멧 \[RFC1950]이다.

#### 4.2.3 Gzip Coding

* “gzip” 코딩은 공통적으로 gzip 파일 압축 프로그램 \[RFC1952]으로 생산된 LZ77 32비트 Cyclic Redundancy Check (CRC) 코딩 이다. 수신자는 “x-gzip”를 “gzip”로 동등하게 간주해야 한다.(SHOULD)

#### 4.3 TE

“TE” 헤더 필드가 요청에서 어떤 전송 코딩인지 나타내며, 청크 외에, 클라이언트가 응답을 수락 할 의향이 있는지 여부와 클라이언트가 청크 전송 코딩의 트레일러 필드를 수용할 의사가 있는지 여부를 나타낸다.

* 클라이언트는 TE로 “chunked” 전송 코딩 이름을 전송해서는 안 된다.(MUST NOT);

HTTP/1.1 수신자는 항상 청크를 허용한다.

TE 사용의 세 가지 예는 다음과 같다.

TE: deflate\
TE:\
TE: trailers, deflate;q=0.5

* TE 헤더 필드는 바로 옆 커넥션에만 적용되므로, TE의 발신자는 TE 필드가 의미론을 지원하지 않는 중개자에 의해 전송 되는 것을 방지하기 위해 Connection 헤더 필드(Section 6.1) 내에서 “TE” 커넥션 옵션을 반드시 보내야 한다. (MUST)

#### 4.4 Trailer

* 메시지가 청크 전송 코딩과 인코딩된 메시지 본문을 포함하거나 발신자 메시지 끝에 있는 트레일러 필드 형태의 메타 데이터를 전송하고자 할 때, 발신자는 메시지 본문 앞에 Trailer 헤더 필드를 생성하여 트레일러에 어떤 필드가 존재하는지 표시해야 한다. (SHOULD)

Trailer = 1#field-name


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hochan049.gitbook.io/cs-interview/web/rfc-7320/4.-transfer-codings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
