Commit graph

71 commits

Author SHA1 Message Date
Vedant Roy
5dc37464af Remove F32 2021-06-18 11:13:46 -04:00
Andrew Jeffery
ff8b8613d5
Flatten objtype (#175)
* Flatten object type

* Use separate construct functions

* Use separate gen_*_diff functions

* Remove maptype and seqtype from Diffs

* Preallocate ops in new_map_or_table

* More preallocations
2021-06-17 20:06:10 +01:00
Andrew Jeffery
8b3938c2e7
Rename UncompressedChange to Change (#173)
It wasn't really uncompressed as we have compressed and uncompressed
changes in the backend. It is just not encoded into the binary format.
The module separation (protocol vs backend) should help with the
distinction.
2021-06-16 11:50:26 +01:00
Andrew Jeffery
71b59dea68
Set levels for instrument (#164) 2021-06-14 23:34:35 +01:00
Andrew Jeffery
e98ed15582 Sort predecessors during encoding 2021-05-25 11:29:25 +01:00
Vedant Roy
aaccefcb11 Switch back to using Vec<u8> 2021-05-24 13:17:37 -07:00
Vedant Roy
bc249bb630 Fix serialization + add test 2021-05-24 13:17:37 -07:00
Vedant Roy
22af56b059 Internal representation = base64 string 2021-05-24 13:17:37 -07:00
Vedant Roy
41021f398f Add bytes type 2021-05-24 13:17:37 -07:00
Alex Good
9bbaf7cbd5 Merge branch 'main' into implement-new-sequence-patch-format 2021-05-17 13:03:57 +01:00
Andrew Jeffery
30a89cb49d Fix clippy lints 2021-05-16 13:10:28 +01:00
Andrew Jeffery
f6f874439b
Move decoding to a new module and separate errors (#129) 2021-05-14 20:20:05 +01:00
Andrew Jeffery
59a24081d2 Switch to expanded_op more 2021-05-10 19:25:43 +01:00
Andrew Jeffery
7a08c52dac
Fix clippy (#118) 2021-05-07 17:07:41 +01:00
Alex Good
e86aabb6a3 Implement new sequence patch format 2021-05-05 21:52:57 +01:00
Andrew Jeffery
d2898fd0d7 Add clippy lints 2021-05-04 20:54:50 +01:00
Andrew Jeffery
d1934f2286 Add formatting config 2021-04-26 09:42:36 -07:00
Andrew Jeffery
18ce93603a encodable: Require encode function implementation 2021-04-25 15:19:33 -07:00
Andrew Jeffery
342504714a Format 2021-04-07 08:07:53 -07:00
Alex Good
82cf04ae49 Implement compression 2021-03-27 16:52:43 +00:00
Andrew Jeffery
921e9859b2
Fix issue in RleDecoder with null runs (#63)
* Add test to check save and load works on failing input

We loop 100 times due to it being a flaky test, likely due to an
iteration order issue in hashmaps.

* Update printing diff of changes

* Add new case for save then load

* Add another failing test case for save_load

* Update test case

* Update test case to not use empty strings in keys

* Specify to decode into usize in rle decoder

The `decoder.read` call was previously inferring to use isize since the
`self.count` variable is that type. This meant that for a list of null
values >= 64 in length it would read it as negative and so enter an
infinite loop of reading nulls, even if there were other values to read.

This changes the read to use usize but introduces the issue of usize
potentially being bigger than isize. This should be very unlikely for
what it is currently used for though so I'll defer this to later work.

* Add a test case to check the repeated nulls issue in rle

* Update tests

* Specify reading rle len as i64 instead of isize
2021-03-26 13:57:08 +00:00
Alex Good
c103b0638e Ritual abasement at the altar of clippy 2021-03-02 19:35:00 +00:00
Alex Good
08f324f7e6 Merge ref encoding/decoding and value encoding/decoding 2021-02-12 12:03:10 -05:00
Alex Good
26dfc7ea40 Implement cursor logic in backend 2021-02-12 12:03:10 -05:00
Alex Good
2d31952d77 Implement encoding and decoding of cursor operations 2021-02-12 12:03:10 -05:00
Alex Good
a28ae6edb6 Fix dependency encoding in document format 2021-01-31 15:59:51 +00:00
Orion Henry
c135b02a48 full document compression 2021-01-29 17:55:59 -05:00
Orion Henry
9a90a8f84c add full document decompression 2021-01-22 13:32:50 -05:00
Orion Henry
cd6d83ef6d removed an unnecessarry round trip from the change encoder 2021-01-14 14:51:54 -05:00
Alex Good
3187afcc51 Use more expressive Operation structure 2021-01-14 12:30:25 -05:00
Alex Good
ce38f5360b Move automerge_backend::UnencodedChange -> automerge_protocol::UncompressedChange 2021-01-14 12:30:25 -05:00
Martin Kleppmann
1350b3e4be Move index of columns ahead of the column data
Corresponding to automerge/automerge@d7f97c5387
2021-01-12 14:45:32 -05:00
Orion Henry
783f615a23 update to use new format for encoding key=_head 2020-09-08 16:53:07 -04:00
Orion Henry
fb3b56112c update binary encoding for op actions to match js implementation 2020-09-08 16:29:24 -04:00
Alex Good
a36a364443 Rename automerge_protocol::Value -> ScalarValue 2020-05-29 21:04:29 +01:00
Alex Good
baaebef6d1 Merge branch 'master' into two-level-objtype 2020-05-25 18:47:46 +01:00
Alex Good
40c8f8f9b3 Move ObjType to two level hierarchy 2020-05-24 10:22:18 +01:00
Orion Henry
cbfac9a7b2 clearly show when using external types via amp:: 2020-05-23 12:38:31 -04:00
Orion Henry
a8cb2d805b opid should have an actor not a string 2020-05-23 12:15:53 -04:00
Orion Henry
48dfd6f29a ActorID is now bytes 2020-05-22 19:00:39 -04:00
Orion Henry
87b44cf977 ChangeRequest->Request 2020-05-22 16:11:26 -04:00
Orion Henry
c6ec8515af move OpType and Operation back to Backend 2020-05-22 15:54:14 -04:00
Orion Henry
a6f1499b2f Change -> UnencodedChange 2020-05-22 15:10:19 -04:00
Orion Henry
92d357efe7 break out change - do some cleanup 2020-05-22 14:57:51 -04:00
Orion Henry
89a1ed46f7 move change back to the backend repo 2020-05-22 13:54:02 -04:00
Orion Henry
2d31ed09cc canonical BinChange wip 2020-05-21 18:53:07 -04:00
Alex Good
0e5ce40cff Fix tests 2020-05-16 02:20:52 +01:00
Alex Good
9bb374b492 Run rustfmt 2020-05-14 01:05:01 +01:00
Orion Henry
df3f4f2eba c interface v2 2020-05-13 15:37:46 -04:00
Alex Good
f91aa3375b Remove From<&[u8]> for ChangeHash and add TryFrom<&[u8]> 2020-05-10 14:32:13 +01:00