aboutsummaryrefslogtreecommitdiff
path: root/core/encoding
Commit message (Collapse)AuthorAgeFilesLines
* encoding/json: clone unquoted stringsNeirokan2025-11-062-15/+17
|
* Merge pull request #5859 from odin-lang/bill/change-licensedev-2025-11gingerBill2025-11-047-31/+20
|\ | | | | Change Odin's LICENSE to zlib from BSD 3-clause
| * Change Odin's LICENSE to zlib from BSD 3-clausegingerBill2025-10-287-31/+20
| | | | | | | | This change was made in order to allow things produced with Odin and using Odin's core library, to not require the LICENSE to also be distributed alongside the binary form.
* | encoding/cbor: fix epoch tag with small valuesLaytan2025-11-031-14/+18
|/
* Link doc lines to source specifications.Jeroen van Rijn2025-10-105-8/+5
|
* Render examples.Jeroen van Rijn2025-10-108-48/+49
|
* Further overhaul of package line comments.Jeroen van Rijn2025-10-0917-19/+15
|
* package lines for encodingJeroen van Rijn2025-10-0911-18/+21
|
* More package linesJeroen van Rijn2025-10-093-4/+6
|
* Package lines for base32, move its tests to tests"Jeroen van Rijn2025-10-093-229/+5
|
* Followup fix to #4895Courtney Strachan2025-10-051-3/+1
|
* Merge branch 'odin-lang:master' into masterCourtney Strachan2025-10-0617-287/+236
|\
| * Add `#+test` to base32_test.odingingerBill2025-09-281-0/+1
| |
| * Require `@(init)` and `@(fini)` to be `proc "contextless" ()`gingerBill2025-08-081-4/+6
| |
| * Change `is_utf16` field to `encoding` and use an enumgingerBill2025-08-053-3/+3
| |
| * Begin supporting `string16` across the core librarygingerBill2025-08-024-6/+10
| |
| * Fix #4705Jeroen van Rijn2025-06-091-1/+2
| | | | | | | | Allocate `doc.tokenizer`, and free it in `destroy`.
| * Clarify `strconv.append_*` to `strconv.write_*`Feoramund2025-06-052-7/+7
| |
| * encoding/cbor: support simd vectorsLaytan Laats2025-06-042-0/+30
| |
| * encoding/cbor: support the matrix typeLaytan Laats2025-06-042-0/+31
| |
| * Fix incorrect CSV reader settings for example, fix typo in docsWesley Kerfoot2025-05-272-3/+1
| |
| * Rename `core:encoding/ansi` to `core:terminal/ansi`Feoramund2025-05-202-157/+0
| |
| * Merge pull request #4944 from dozn/masterLaytan2025-05-151-8/+14
| |\ | | | | | | [core:encoding/json] When Unmarshalling, Only Match On Struct Tags If Present
| | * [core:encoding/json] When Unmarshalling, Only Match Struct Tags If Presentdozn2025-03-171-8/+14
| | |
| * | Fixed an overflow when decoding a large CBOR slice.Barinzaya2025-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | The initial allocation for the slice is limited to prevent untrusted data from forcing a huge allocation, but then the dynamic array was created with a capacity of the unlimited length, rather than the actual capacity of the allocation. This was causing a buffer overrun.
| * | Add cbor.unmarshal_from_bytes taking a []byteJeroen van Rijn2025-04-291-0/+6
| | |
| * | Fix typo in private functionEly Alon2025-04-281-2/+2
| | |
| * | Add commentJeroen van Rijn2025-04-191-0/+4
| | |
| * | Fix parsing of CDATA tags (#5059)Jeroen van Rijn2025-04-193-92/+99
| | | | | | | | | Fixes #5054
| * | Fix HXA defer warningJeroen van Rijn2025-04-071-2/+2
| | |
| * | Fix broken examples in documentation tester.Jeroen van Rijn2025-04-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | No more: ``` We could not find the procedure "pkg_foo_example :: proc()" needed to test the example created for "pkg.foo" The following procedures were found: bar() ```
| * | fix unmarshalling bit sets in jsonLaytan Laats2025-03-221-2/+18
| |/ | | | | | | Fixes #4761
* / Fixed json null value parsingCourtney Strachan2025-03-021-1/+7
|/
* encoding/json: marshal enumerated arrays to objects with key-value pairsjkenda2025-02-011-3/+13
|
* Fix stray space vs. tabJeroen van Rijn2025-01-121-4/+4
|
* Merge pull request #4634 from dozn/patch-1gingerBill2025-01-061-2/+2
|\ | | | | Use Struct Tags For Embedded (with `using`) Structs When Unmarshalling JSON
| * Remove unnecessary string() conversion.dozn2024-12-281-1/+1
| |
| * Use Struct Tags For Embedded (with `using`) Structs When Unmarshalling JSONdozn2024-12-281-1/+1
| | | | | | A fix for https://github.com/odin-lang/Odin/issues/4539
* | encoding/base32: Add `@(rodata)` attribute to default tablesZoltán Kéri2025-01-031-0/+2
| | | | | | | | | | | | | | Add `@(rodata)` attribute to `ENC_TABLE` and `DEC_TABLE` to mark them as read-only data. This places these tables in the read-only section of the executable, protecting them from modification during program execution.
* | encoding/base32: Fix RFC 4648 references and add RFC reference URLZoltán Kéri2024-12-312-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix incorrect RFC 4648 section references: - Add RFC URL reference at package level - Update Error enum documentation to reference correct sections: - Invalid_Character: Section 3.3 (non-alphabet characters) - Invalid_Length: Section 6 (base32 block size requirements) - Malformed_Input: Section 3.2 (padding) - Fix test file section references to match correct sections This ensures all RFC references are accurate and adds a link to the source RFC for reference.
* | encoding/base32: Fix style issues for CIZoltán Kéri2024-12-311-5/+4
| |
* | encoding/base32: Convert files to UTF-8 with Unix line endingsZoltán Kéri2024-12-301-223/+224
| |
* | encoding/base32: Add proper cleanup for encoded strings in testsZoltán Kéri2024-12-301-1/+3
| | | | | | | | | | | | Add defer delete for encoded strings across all test procedures to ensure proper cleanup and prevent memory leaks. This completes the memory management improvements started in 591dd876.
* | encoding/base32: Add custom alphabet test caseZoltán Kéri2024-12-301-0/+75
| | | | | | | | | | | | | | | | Add test case to verify custom alphabet support. The test uses a decimal-uppercase alphabet (0-9, A-V) to test both encoding and decoding with custom tables, including validation. This ensures the encode and decode functions work correctly with custom encoding tables and validation functions as documented.
* | encoding/base32: Remove incorrect defer delete in encode()Zoltán Kéri2024-12-301-1/+0
| | | | | | | | | | | | | | | | Remove premature deallocation of the output buffer which was causing use-after-free behavior. The returned string needs to take ownership of this memory, but the defer delete was freeing it before the string could be used. This fixes issues with encoding that were introduced by overly aggressive memory cleanup in 93238db2.
* | encoding/base32: Add encode->decode roundtrip testZoltán Kéri2024-12-301-0/+23
| | | | | | | | | | | | | | Add test_base32_roundtrip() to verify the encode->decode roundtrip preserves data integrity. This test helps ensure our base32 implementation correctly handles the full encode->decode cycle without data loss or corruption.
* | encoding/base32: Move tests to base32_test.odinZoltán Kéri2024-12-292-126/+127
| | | | | | | | | | Move existing test procedures to a dedicated test file for better code organization and maintainability.
* | encoding/base32: Expand `DEC_TABLE` to full 256 bytesZoltán Kéri2024-12-261-13/+15
| | | | | | | | | | | | The decoding table was only 224 bytes which caused type mismatches when using custom alphabets, so expand with zeroes to cover full byte range while maintaining the same decoding logic.
* | encoding/base32: Use `ENC_TBL` parameter consistently in encode()Zoltán Kéri2024-12-261-9/+9
| | | | | | | | | | | | | | Fix encoding to properly use provided encoding table parameter instead of hardcoded `ENC_TABLE`. This makes encode properly support custom alphabets as documented.
* | encoding/base32: Add custom validation supportZoltán Kéri2024-12-251-5/+16
| | | | | | | | | | | | | | | | Add support for custom alphabet validation through an optional validation function parameter. The default validation follows RFC 4648 base32 alphabet rules (A-Z, 2-7). This properly supports the documented ability to use custom alphabets.