[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Bytes](https://evolu.dev/docs/api-reference/common/Bytes) › ByteSize

```ts
type ByteSize = ByteSizeLiteral | ByteLength;
```

Defined in: [packages/common/src/Bytes.ts:1914](https://github.com/evoluhq/evolu/blob/dd96d79f1dbe9a49fa12ce8e0aa7d3d0177795ca/packages/common/src/Bytes.ts#L1914)

[ByteSizeLiteral](https://evolu.dev/docs/api-reference/common/Bytes/variables/ByteSizeLiteral) or [ByteLength](https://evolu.dev/docs/api-reference/common/Bytes/variables/ByteLength).

Convenience input accepting a human-readable [ByteSizeLiteral](https://evolu.dev/docs/api-reference/common/Bytes/variables/ByteSizeLiteral) or a
validated [ByteLength](https://evolu.dev/docs/api-reference/common/Bytes/variables/ByteLength) for values that no literal expresses. APIs
normalize it with [byteSizeToByteLength](https://evolu.dev/docs/api-reference/common/Bytes/functions/byteSizeToByteLength).

### Example

```ts
import {
  assertEqual,
  ByteLength,
  byteSizeToByteLength,
  type ByteSize,
} from "@evolu/common";

const literal: ByteSize = "1MiB";
const validated: ByteSize = ByteLength.orThrow(1000000);

assertEqual(byteSizeToByteLength(literal), 1048576);
assertEqual(byteSizeToByteLength(validated), 1000000);
```