Skip to content

TypedArray-based TAG_List Number Arrays #56

Description

@Offroaders123

I was wondering if TypedArrays could also be used for NBT Lists with number types - the generic List ones which accept any other data type. There are TypedArray classes for all number types supported in NBT. I see that there are valueOf parameters in #readByte, #readInt, #readLong etc. in read.ts which directly return the numeric values. The issue is that individual elements would lose their type.

Possibly, could there be an option to drop all number types when reading for those of us who aren't concerned about the types? I'm not sure how this would work with TypeScript but it'd be better for memory. Even more possibly, the untyped reading could be done when the code is built/in production, which means that the developers get all the advantages of types and the users get lower memory usage.

Originally posted by @SuperLlama88888 in #43

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions