7.4.2 지원 형식 (format)

멤버함수인 append()read_num()는 인수로 형식을 지정해야 합니다.

형식은 Signed/Unsigned/Floating-point 를 의미하는 영문자 1개와 byte 수를 의미하는 숫자 1개로 구성됩니다. 영문자가 대문자이면 big endian, 소문자이면 little endian입니다.

형식
endian
타입
바이트수

"S1"

big endian

부호있는 정수 (signed integer)

1byte

"S2"

big endian

부호있는 정수 (signed integer)

2byte

"S4"

big endian

부호있는 정수 (signed integer)

4byte

"U1"

big endian

부호없는 정수 (unsigned integer)

1byte

"U2"

big endian

부호없는 정수 (unsigned integer)

2byte

"U4"

big endian

부호없는 정수 (unsigned integer)

4byte

"F4"

big endian

단정도 실수 (single-precision real)

4byte

"F8"

big endian

배정도 실수 (double-precision real)

8byte

"s1"

little endian

부호있는 정수 (signed integer)

1byte

"s2"

little endian

부호있는 정수 (signed integer)

2byte

"s4"

little endian

부호있는 정수 (signed integer)

4byte

"u1"

little endian

부호없는 정수 (unsigned integer)

1byte

"u2"

little endian

부호없는 정수 (unsigned integer)

2byte

"u4"

little endian

부호없는 정수 (unsigned integer)

4byte

"f4"

little endian

단정도 실수 (single-precision real)

4byte

"f8"

little endian

배정도 실수 (double-precision real)

8byte

Last updated

Was this helpful?