diff --git a/src/decode.ts b/src/decode.ts index 441ab94..4dc9629 100644 --- a/src/decode.ts +++ b/src/decode.ts @@ -3,7 +3,7 @@ import { Uint8ArrayList } from 'uint8arraylist' import type { Source } from 'it-stream-types' import type { Message } from './message-types.js' -export const MAX_MSG_SIZE = Math.pow(2, 20) +export const MAX_MSG_SIZE = 1 << 20 // 1MB interface MessageHeader { id: number