1
0
mirror of synced 2026-09-01 00:04:45 +00:00
Commit Graph

23 Commits

Author SHA1 Message Date
Borewit 64d2148d11 id3v2: harden frame parsing and fix edge cases
- Correctly handle missing null terminators in text fields
- Avoid reading text encoding for frames that do not define it
- Decode URL link frames according to ID3v2 specification
- Improve robustness of POPM and GEOB frame parsing
2026-01-06 13:39:38 +01:00
Borewit fd8b32b309 Improve findZero:
- eliminates all OOB reads.
- makes the “not found” behavior explicit and consistent.
2026-01-06 13:39:38 +01:00
Borewit abbe09323d Improve MP3 parsing code
Favor Uint8Array.subarray, over passing offset and length
2026-01-06 13:39:38 +01:00
Borewit 65ec1c8fbd Move header parsing to FrameHeader.ts file, to allow re-using
Replace passing offset, and utilize `Uint8Array.subarray` instead.
2026-01-06 13:39:38 +01:00
Borewit 5445cbb816 Support variable length PCNT and POPM numeric values.
Add `common.playCounter`
2025-09-15 20:36:21 +02:00
Borewit 95c35ff566 Update Biome to 2.2.0 2025-08-19 12:28:41 +02:00
Borewit 06d83b2e7a Fix missing uint8array-extras dependency 2025-08-19 12:09:40 +02:00
Borewit a5bc776e6d Remove uint8array-extras dependency
Remove `uint8array-extras` dependency in favour of having the same TextEncoder everywhere.
2025-08-13 09:58:54 +01:00
Borewit 8fe9ac2057 Implement own custom Error using ADT style implementation 2024-08-29 17:48:28 +02:00
Borewit 3937085154 Enable TypeScript options strict & verbatimModuleSyntax 2024-08-12 08:54:43 +02:00
Borewit 89ff43a053 Migrate eslint to biome, fix lint errors 2024-08-08 19:15:49 +02:00
Bjorn Stromberg eb0f8e61b8 feat: convert most Buffer usage to Uint8Array (#2103)
Convert most Buffer usage to Uint8Array and `uint8array-extras` to fill functionality gaps
* Update `token-types` to version 6.0.0
* Update `strtok3`  to version 7.1.0
* Update `file-type` to version 19.1.0
* Update dependency diagram to desired Node.js free via primary entry point

Co-authored-by: Borewit <Borewit@users.noreply.github.com>
2024-07-08 19:53:02 +02:00
Borewit 7cdebd1ca6 Migrate from CommonJS to ES Modules 2022-02-27 15:27:40 +01:00
Borewit 011cfb0a98 Minor code improvements in MPEG parser, replacing Buffer with Uint8Array 2022-02-27 12:40:25 +01:00
Borewit e089a474bd Ensure Node.js Buffer class is used to decode strings from Uint8Array 2022-02-24 22:46:59 +01:00
Borewit 19366b896c Fix lint code style issues
Parse TypeScript files recursive.
Fix duplicate interface declarations.
2022-01-29 19:02:24 +01:00
Borewit be2222c0e7 Handle invalid (odd octet length) UTF-16 string
Register a warning instead of a fatal error.

Resolves Borewit/music-metadata#979
2022-01-17 15:58:51 +01:00
Borewit 973e90978c Use Uint8Array instead of Buffer where reasonable possible 2021-07-22 15:34:01 +02:00
Borewit ef9a1883ef Simplify buffer string decoding
Get rid of `Windows1292Decoder` class, replace with `lantin1` buffer decoding.
2021-07-13 18:24:26 +02:00
Borewit fc2b54e113 Simplify utility (util) functions 2021-07-13 17:02:41 +02:00
Borewit ac47b0fb62 Convert static methods from Util to module functions
Normalize the util is imported.
2021-07-11 17:04:36 +02:00
Borewit abbaafd18c Get rid of assert dependency. 2021-01-10 21:10:25 +01:00
Borewit 9ba31fc797 Combine JavaScript & TypeScript folder in /lib 2019-09-07 18:30:20 +02:00