fix: garbled characters caused by atob by 52funny · Pull Request #422 · sigoden/dufs (original) (raw)

Author your commit #421 solves some problems but creates some new ones. For example, when the folder is some non-ASCII form of string, it may cause garbled problems. The root cause is that the atob function only accept a few ASCII characters, resulting in errors parsing strings beyond the 0xff range.

index.js #L111

image

This commit fixes a problem with atob not parsing non-ASCII characters. The Uint32Array view is utilized to process 4 bytes at a time, potentially providing an additional performance boost when working with large amounts of data.