# SIZE_CONSTANTS

> `const` **SIZE\_CONSTANTS**: `object`

Defined in: [packages/synapse-sdk/src/utils/constants.ts:150](https://github.com/FilOzone/synapse-sdk/blob/6cf8b3ed2dd3ae76ed05cb86995d711a08a298a6/packages/synapse-sdk/src/utils/constants.ts#L150)

Data size constants

## Type Declaration

### DEFAULT\_UPLOAD\_BATCH\_SIZE

> `readonly` **DEFAULT\_UPLOAD\_BATCH\_SIZE**: `32` = `32`

Default number of uploads to batch together in a single addPieces transaction
This balances gas efficiency with reasonable transaction sizes

### GiB

> `readonly` **GiB**: `bigint`

Bytes in 1 GiB

### KiB

> `readonly` **KiB**: `1024n` = `1024n`

Bytes in 1 KiB

### MAX\_UPLOAD\_SIZE

> `readonly` **MAX\_UPLOAD\_SIZE**: `1065353216` = `CORE_SIZE_CONSTANTS.MAX_UPLOAD_SIZE`

Maximum upload size supported by Curio PDP servers: 1 GiB adjusted for fr32 expansion.

1 GiB * (127/128) = 1,065,353,216 bytes

Fr32 encoding adds 2 bits of padding per 254 bits of data, resulting in 128 bytes
of padded data for every 127 bytes of raw data.

Note: While it's technically possible to upload pieces this large as Uint8Array
(even in browsers), streaming via AsyncIterable is strongly recommended for
non-trivial sizes. In-memory operations with large byte arrays can:
- Cause memory pressure and garbage collection issues
- Block the JavaScript event loop during allocation/copying
- Trigger browser tab slowdowns or "unresponsive script" warnings

For optimal performance and resource utilization, prefer streaming for pieces
larger than a few megabytes, especially in browser environments.

Imported from @filoz/synapse-core/piece

### MiB

> `readonly` **MiB**: `bigint`

Bytes in 1 MiB

### MIN\_UPLOAD\_SIZE

> `readonly` **MIN\_UPLOAD\_SIZE**: `127` = `127`

Minimum upload size (127 bytes)
PieceCIDv2 calculation requires at least 127 bytes payload

### PiB

> `readonly` **PiB**: `bigint`

Bytes in 1 PiB

### TiB

> `readonly` **TiB**: `bigint`

Bytes in 1 TiB