Commit Graph

62 Commits

Author SHA1 Message Date
Tony Garnock-Jones fe97f70255 First steps toward experimental "indexed" syntax 2020-07-13 09:23:30 +02:00
Tony Garnock-Jones 7cc7bd783d Adjust internal trait API 2020-07-10 16:59:54 +02:00
Tony Garnock-Jones 9f83756931 Remove decoder/encoder; undoes performance regression 2020-07-08 15:44:06 +02:00
Tony Garnock-Jones 28101cc7d1 Refactor to extract packed format from general traits. Regression in encode performance? 2020-07-08 15:44:06 +02:00
Tony Garnock-Jones 70a305458a Avoid some copying 2020-06-17 11:01:44 +02:00
Tony Garnock-Jones b1c7fe8c04 Remove unnecessary Cow 2020-06-17 09:35:09 +02:00
Tony Garnock-Jones 046a2ad999 Better varint reader 2020-06-17 04:11:27 +02:00
Tony Garnock-Jones f2910eb8d0 Slim down the common case of no annotations 2020-06-17 02:39:01 +02:00
Tony Garnock-Jones e01f960ddc Benchmarks and test factorization 2020-06-16 17:46:55 +02:00
Tony Garnock-Jones bffbeb2f6e Smaller Record; also, use u128/i128 when possible 2020-06-15 16:03:19 +02:00
Tony Garnock-Jones 1f4adc5ba6 Oh cool, is_none() exists 2020-06-15 09:58:49 +02:00
Tony Garnock-Jones 22b76cb9b6 Consume all sequence items in direct deserialization, matching deserialization from a Value 2020-05-29 11:07:55 +02:00
Tony Garnock-Jones 65b5399dbe Make CompoundBody consumption past end idempotent 2020-05-29 10:58:40 +02:00
Tony Garnock-Jones d1a5389060 Allow f32 and f64 to deserialize into each other 2020-05-29 10:58:00 +02:00
Tony Garnock-Jones b5f4c3a498 Remove placeholders from spec and implementations 2/5
Enormous refactoring in Rust implementation. Direct deserialization.
Zero-copy deserialization in some cases. Much faster.
2020-05-28 23:23:19 +02:00
Tony Garnock-Jones dfc50fcaee Simplify code (and get back up to speed! ~150kHz) by insisting on IOValue for all codec operations 2020-05-26 11:01:33 +02:00
Tony Garnock-Jones c30154e0c8 Improve (!) safety at the expense of speed: 155kHz -> 115kHz :-/ 2020-05-26 09:08:17 +02:00
Tony Garnock-Jones b122d6e2e0 copy_via able to map domains 2020-05-25 20:11:54 +02:00
Tony Garnock-Jones 2d57d0001b Even more error cleanup 2020-05-25 16:21:18 +02:00
Tony Garnock-Jones 450b73a4d2 More error cleanup 2020-05-25 16:12:41 +02:00
Tony Garnock-Jones 3f5e431717 Clean up error situation 2020-05-25 15:40:01 +02:00
Tony Garnock-Jones 1011818be6 Split out general std::io::Error wrapper 2020-05-25 15:34:17 +02:00
Tony Garnock-Jones 94058b5ec2 Simplify again by moving away from excessive internal buffering 2020-05-25 15:29:54 +02:00
Tony Garnock-Jones f07d2e6a5d Simplify and speed up decoding 2020-05-25 15:00:58 +02:00
Tony Garnock-Jones 6ad1707870 First stab at factoring out Reader trait 2020-05-25 13:42:06 +02:00
Tony Garnock-Jones 92463c37d4 Less ownership in preserves::ser::Serializer 2020-05-24 21:17:41 +02:00
Tony Garnock-Jones fdae09b44c Tweak preserves::ser API 2020-05-24 14:40:36 +02:00
Tony Garnock-Jones 67bf47a5c9 Less safe but drastically more efficient raw-value (de)serialization 2020-05-24 13:47:42 +02:00
Tony Garnock-Jones bddb4331aa Direct serialization 2020-05-23 22:33:02 +02:00
Tony Garnock-Jones d29ec9ffc4 Avoid a few small allocations when decoding 2020-05-22 10:38:34 +02:00
Tony Garnock-Jones 316a772fec Change API: as_record() now takes Option<usize> 2020-05-18 16:42:59 +02:00
Tony Garnock-Jones 2a85e53acc Repair mistaken usage of String instead of Symbol 2020-05-18 16:42:34 +02:00
Tony Garnock-Jones 8e0ab95d82 Autodetectability of binary vs text; documented test case schema a little 2020-05-13 12:56:13 +02:00
Tony Garnock-Jones b1ca95c835 Customizable treatment of Domain during encoding 2019-10-23 22:58:36 +01:00
Tony Garnock-Jones 27fb961653 Allow embedding of domain-specific non-Preserves data within a Preserves Value 2019-10-22 22:36:01 +01:00
Tony Garnock-Jones 488bfdc59c Fix clippyisms 2019-10-20 13:57:04 +01:00
Tony Garnock-Jones 6f03538956 Clippy told me not to implement Hash when deriving PartialEq. Fair enough 2019-10-19 23:31:00 +01:00
Tony Garnock-Jones 84f99fc471 New tests 2019-10-19 23:30:46 +01:00
Tony Garnock-Jones 4b957d8785 Advance index when reading multiple bytes as well as one at a time 2019-10-19 23:26:44 +01:00
Tony Garnock-Jones a00314d108 Refine error API 2019-10-15 20:44:19 +01:00
Tony Garnock-Jones c95b000b7b annotations_mut, value_mut for PlainValue 2019-10-12 22:51:25 +01:00
Tony Garnock-Jones 9611c1f977 Delegate most numeric From implementations to the i128 one 2019-10-12 22:36:46 +01:00
Tony Garnock-Jones 623bbd0a71 annotations() returns slice rather than Vec ref 2019-10-12 22:36:18 +01:00
Tony Garnock-Jones 54d1e349b3 AValue -> PlainValue, RcValue and ArcValue 2019-10-12 21:54:20 +01:00
Tony Garnock-Jones f1b37ac9af First tentative step to allowing reuse of Value with direct containment, Rc and Arc 2019-10-12 15:40:35 +01:00
Tony Garnock-Jones f081470b1e panic -> unreachable 2019-09-20 21:43:08 +01:00
Tony Garnock-Jones 72edd1327a From<value::decoder::Error> for std::io::Error 2019-09-20 21:42:45 +01:00
Tony Garnock-Jones 8cdd67f5ba Mutable Read in Decoder 2019-09-20 21:42:09 +01:00
Tony Garnock-Jones 898a5d680d Expose encoder::Error 2019-09-19 21:49:46 +01:00
Tony Garnock-Jones 63cd853ba1 Rc -> Box 2019-09-19 21:35:00 +01:00