static LosWriter() { _charBufferAllocator = new CharBufferAllocator(BUFFER_SIZE, MAX_FREE_BUFFERS); int byteBufferSize = Encoding.UTF8.GetMaxByteCount(BUFFER_SIZE); _byteBufferAllocator = new UbyteBufferAllocator(byteBufferSize, MAX_FREE_BUFFERS); // base64 increases data by up to 33%, so we err on the side of caution here _charBufferAllocatorBase64 = new CharBufferAllocator((int) (byteBufferSize * 1.35), MAX_FREE_BUFFERS); }
static LosWriter() { _charBufferAllocator = new CharBufferAllocator(BUFFER_SIZE, MAX_FREE_BUFFERS); int byteBufferSize = Encoding.UTF8.GetMaxByteCount(BUFFER_SIZE); _byteBufferAllocator = new UbyteBufferAllocator(byteBufferSize, MAX_FREE_BUFFERS); // base64 increases data by up to 33%, so we err on the side of caution here _charBufferAllocatorBase64 = new CharBufferAllocator((int)(byteBufferSize * 1.35), MAX_FREE_BUFFERS); }