Skip to content

yEnc string of blob is larger than base64 #15

@AlexeyBoiko

Description

@AlexeyBoiko

Hello,
Thank you for the project.

What I am doing wrong.
This browser test encode image to string

/** @param {Blob} img */
const test = img => {
	// yEnc
	img.arrayBuffer()
		.then(arrayBuffer => console.log(dynamicEncode(new Uint8Array(arrayBuffer))));

	// base64
	const reader = new FileReader();
	reader.onloadend = () => console.log(reader.result);
	reader.readAsDataURL(img);
};

yEnc string is 5.5 MB
base64 string is 4.7 MB

Image

My goal is to store image in JSON.
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions