Appendix

1. pack/unpack Format Characters

1.1 Format Characters

Format

C Type

Python Type

DolphinDB Type

Range

x

pad byte

no value

VOID

c

char

bytes of length 1

CHAR

-27 +1~27 -1

b

signed char

integer

LONG

-27 ~27 -1

B

unsigned char

integer

LONG

0~28 -1

?

_Bool

bool

LONG

-263 ~263 -1

h

short

integer

LONG

-215 ~215 -1

H

unsigned short

integer

LONG

0~216 -1

i

int

integer

LONG

-231 ~231 -1

I

unsigned int

integer

LONG

0~232 -1

l

long

integer

LONG

-231~231 -1

L

unsigned long

integer

LONG

0~232 -1

q

long long

integer

LONG

-263 ~263 -1

Q

unsigned long long

integer

LONG

0~263 -1

n

ssize_t

integer

LONG

-263 ~263 -1

N

size_t

integer

LONG

0~263 -1

f

float

float

LONG

-3.40E+38 ~ +3.40E+38

d

double

float

LONG

-1.79E+308 ~ +1.79E+308

s

char[]

bytes

STRING

p

char[]

bytes

STRING

P

void*

integer

LONG

-263 ~263 -1

1.2 Byte Order, Size, and Alignment

Character

Byte order

Size

Alignment

>

big-endian

standard

none

=

native

standard

none

<

little-endian

standard

none

@

native

native

native

!

network (= big-endian)

native

none