benrr101 / node-taglib-sharp

A node.js port of mono/taglib-sharp
GNU Lesser General Public License v2.1
42 stars 11 forks source link

ByteVector "Comprehensions" #55

Closed benrr101 closed 2 years ago

benrr101 commented 2 years ago

I want to make it so that using ByteVector.mid() doesn't result in the bytes being copied every single time. After several weeks of work, a lot of thinking, and a lot of thinking on "best practices", I revamped the ByteVector class to be a copy-on-write class that utilizes the "view" concept of Uint8Array to remove the need for copying bytes if only a subset of the bytes are desired to be read.