- From: Andreu Botella <notifications@github.com>
- Date: Mon, 12 Aug 2024 05:46:40 -0700
- To: whatwg/encoding <encoding@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 12 August 2024 12:46:44 UTC
I suspect that this API might be used to determine the length of the buffer to use for `encodeInto()`, which it is not a good fit for, since it would iterate through the string twice unnecessarily. If we think it is useful to add this API, maybe we should also add another `maxByteLength` method that simply returns `3 * string.length`, to try and steer developers to the right usage patterns. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/encoding/issues/333#issuecomment-2283890740 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/encoding/issues/333/2283890740@github.com>
Received on Monday, 12 August 2024 12:46:44 UTC