Caio
a032c195d8
Sort elements (walk.rs)
...
1. Private declarations come after public declarations
2. Implementation blocks are next to its declarations
3. Elements are sorted in ascending order
2020-08-09 13:42:09 -03:00
Joonas Koivunen
25e56fd51d
add: missing fmt::Debug impl
2020-08-08 11:52:31 +03:00
Joonas Koivunen
fdc5f8aa84
refactor: make PostOrderIterator 'static
...
kind of forgot the String and Vec<u8> while trying to impl the Iterator
trait to return non-static values.
2020-08-07 15:06:55 +03:00
Joonas Koivunen
41566e4759
refactor(postorderiter): remove redundant visibilities
2020-08-07 15:06:55 +03:00
Joonas Koivunen
f24f9bda42
refactor: reorder items, fix doc
2020-08-07 15:06:55 +03:00
Joonas Koivunen
761124884f
feat: block size limit
2020-08-07 15:06:55 +03:00
Joonas Koivunen
b134593708
doc: minor too short sentence
2020-08-07 15:06:55 +03:00
Joonas Koivunen
5d8b124367
doc: suggestions from code review
...
Thanks to ljedrz for the many many fixes.
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-08-07 15:06:55 +03:00
Joonas Koivunen
7d7915a9da
doc: remove mention of wrap in => wrap with
2020-08-07 15:06:55 +03:00
Joonas Koivunen
7bbff65bdd
fix: DirBuilder::is_empty
2020-08-07 15:06:55 +03:00
Joonas Koivunen
39583a77f1
refactor: remove extra initialization
2020-08-07 15:06:55 +03:00
Joonas Koivunen
1c71e3c08d
refactor: tests repeated the verify with block dump fn
2020-08-07 15:06:55 +03:00
Joonas Koivunen
f3b92d48d6
fix: replace todo! with Err(PathEndsInSlash)
...
this can leave empty nodes in the tree.
2020-08-07 15:06:55 +03:00
Joonas Koivunen
9e948f943f
perf: render Cids to bytes without allocating a Vec
...
not sure how much sense does this make, given that the byte writing fns
might be less inlined. would be nice to have some benchmarks.
this also adds a test to verify directory cid when using cidv1 even
though it's quite unclear to me if those are allowed in unixfs dirs.
2020-08-07 15:06:55 +03:00
Joonas Koivunen
3e499e161e
perf: custom dag-pb serialization
...
use the BTreeMap<String, Leaf> directly to output the PBLink alike
bytes without going through the mapping into Vec. Does not support Cid
v1 though yet.
2020-08-07 15:06:55 +03:00
Joonas Koivunen
653d079cc9
doc: add note on HAMT sharding, adjust
2020-08-07 15:06:55 +03:00
Joonas Koivunen
a90826b48d
perf: avoid clearing block_buffer
...
this should lead to less zero extending but it's questionable if this is
more performant.
2020-08-07 15:06:55 +03:00
Joonas Koivunen
5534fef2b8
refactor: wrap_in_directory => wrap_with_directory
...
just aligning the terminology and trying not to invent new terms.
2020-08-07 15:06:55 +03:00
Joonas Koivunen
14112c3dca
feat: /add?wrap_with_directory=true
...
previous implementation included "defaulting the name for the wrapper
dir" which was extra and not expected by the interface tests.
2020-08-07 15:06:55 +03:00
Joonas Koivunen
8319e8bd97
chore: remove extra clone (clippy)
2020-08-07 15:06:55 +03:00
Joonas Koivunen
57737b49c6
refactor: detupleify into (Owned)?TreeNode
2020-08-07 15:06:55 +03:00
Joonas Koivunen
a5b52b3682
doc: add initial documentation
2020-08-07 15:06:55 +03:00
Joonas Koivunen
6ba4195500
refactor: split dir/builder.rs up
...
* split off dir_builder.rs
* split off PostOrderIterator
* split bufferedtreebuilder off
2020-08-07 15:06:55 +03:00
Joonas Koivunen
f0bb5b41fd
feat: create empty directories without metadata
...
this is the go-ipfs 0.5 level support for add and directories. next up
will be parsing the headers as unixfsv1.5 metadata and using those with
the directories *and* files.
2020-08-07 15:06:55 +03:00
Joonas Koivunen
ccd6bbe248
feat: build directory trees on /add
2020-08-07 15:06:53 +03:00
Joonas Koivunen
31e2a5ee5a
fix: remove unneeded mut in render_directory
2020-08-07 15:05:05 +03:00
Joonas Koivunen
de9247574d
feat: generate actual dag-pb
2020-08-07 15:05:05 +03:00
Joonas Koivunen
fa16bfd397
feat: unixfs tree builder
2020-08-07 15:05:05 +03:00
Caio
f69f2d25b8
Update filetime
2020-08-03 14:47:17 -03:00
Caio
15ff8885b2
Fix android build and include unixfs crate
2020-08-01 14:31:11 -03:00
Caio
1f8cd25fd9
Split Entry into two different enums
2020-07-31 08:39:47 -03:00
Caio
eb99452664
Remove unwrap usage in continue_walk
2020-07-28 15:04:41 -03:00
ljedrz
3b6ad52d85
chore: update remaining deps
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-28 13:44:45 +02:00
ljedrz
cc26f40d14
feat: update libp2p again
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-21 14:50:06 +02:00
ljedrz
88c7219790
feat: update some dependencies
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-07-21 10:31:55 +02:00
Joonas Koivunen
fedf176e3d
fix: full link block generation
...
this included making the compression to loop on the lower level, making
the algorithm in place modifying instead of draining (and thus moving
yet to be processed links). added comments and asserts as well.
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-07-17 18:00:35 +03:00
Joonas Koivunen
27068d1e4e
fix: Link was missing fmt::Debug
2020-07-17 15:38:54 +03:00
Joonas Koivunen
41b188d781
fix: avoid undeflow in LinkFormatter
2020-07-17 15:38:32 +03:00
Joonas Koivunen
d8a657a935
chore: ignore failing test, refer to bug
2020-07-16 10:18:07 +03:00
Joonas Koivunen
745f005cde
fix: remove magic from full_link_block
...
174 == default balanced branching_factor
2020-07-16 10:18:07 +03:00
Joonas Koivunen
af3753e25e
test: discovered new failing adder test case
2020-07-14 16:09:19 +03:00
Joonas Koivunen
2553de32de
refactor: go back to moving builder
2020-07-03 12:20:58 +03:00
Joonas Koivunen
2d31efafb2
chore: changelog
2020-07-03 12:20:58 +03:00
Joonas Koivunen
77657806d7
doc: enhance, document lore, suggestions
...
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-07-03 12:20:58 +03:00
Joonas Koivunen
13e5036126
refactor: use Default::default() struct init
2020-07-03 12:20:58 +03:00
Joonas Koivunen
28065973ad
refactor: name the 4-tuple as Link
2020-07-03 12:20:58 +03:00
Joonas Koivunen
a409095509
doc: suggestions from code review
...
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-07-03 12:20:58 +03:00
Joonas Koivunen
c47bfc1933
fix: debug intermediate levels as well
2020-07-03 12:20:58 +03:00
Joonas Koivunen
8912649d1d
chore: clippy warning
2020-07-03 12:20:58 +03:00
Joonas Koivunen
0ff594c156
refactor: complicate/simplify link debugging
2020-07-03 12:20:58 +03:00
Joonas Koivunen
e24eb1c97e
refactor: remove unused result return type
2020-07-03 12:20:58 +03:00
Joonas Koivunen
d3bd086d43
add: FileAdderBuilder and enhanced docs
2020-07-03 12:20:58 +03:00
Joonas Koivunen
eb3a0bb844
refactor: allow one less copy with prechunked input
2020-07-03 12:20:58 +03:00
Joonas Koivunen
1c4f59a3e7
fix: do less work to speed up test
2020-07-03 12:20:58 +03:00
Joonas Koivunen
c13bd36dcc
refactor: collector out of the adder
2020-07-03 12:20:58 +03:00
Joonas Koivunen
7bddf33313
refactor: simplify link flushing
2020-07-03 12:20:58 +03:00
Joonas Koivunen
bdeefb0d85
doc: adjust comments
2020-07-03 12:20:58 +03:00
Joonas Koivunen
791b0334d9
perf: reuse links and blocksizes
...
no noticeable changes in benchmarks
2020-07-03 12:20:58 +03:00
Joonas Koivunen
15073666b1
fix: the 174*256*1024 + 1 case
2020-07-03 12:20:58 +03:00
Joonas Koivunen
ae1976b3f3
add: failing test case
2020-07-03 12:20:58 +03:00
Joonas Koivunen
fec28f6422
chore: rustfmt
2020-07-03 12:20:58 +03:00
Joonas Koivunen
bf9ec07d04
fix: produce block for empty files
2020-07-03 12:20:58 +03:00
Joonas Koivunen
8310df38af
chore: remove mistakenly added ignore
2020-07-03 12:20:58 +03:00
Joonas Koivunen
89387c475e
refactor: update comments, reorder uses
2020-07-03 12:20:58 +03:00
Joonas Koivunen
f6e78c3ff7
refactor: move file adder under file
2020-07-03 12:20:58 +03:00
Joonas Koivunen
153d6e52ec
doc: file adder
2020-07-03 12:20:58 +03:00
Joonas Koivunen
8d0422ba35
fix: example cidv1 output, buffer to size hint
2020-07-03 12:20:58 +03:00
Joonas Koivunen
4444a2301d
fix: add FileAdder impl Debug
2020-07-03 12:20:58 +03:00
Joonas Koivunen
b5868ee3e8
refactor: remove indentation level
2020-07-03 12:20:58 +03:00
Joonas Koivunen
c54118f324
test: more tests to catch the chunking issue
2020-07-03 12:20:53 +03:00
Joonas Koivunen
9ece3b943f
test: add test case for three layers
2020-07-03 12:20:31 +03:00
Joonas Koivunen
587fd14461
add: examples/add.rs, still bad output
2020-07-03 12:20:31 +03:00
Joonas Koivunen
6498436ae8
chore: make sha2 and multihash !dev deps
...
they are needed in the adder to create links.
2020-07-03 12:20:31 +03:00
Joonas Koivunen
36ad14b127
feat: initial file adder
...
Should be fixable to create trees for files.
2020-07-03 12:20:31 +03:00
ljedrz
e8aa5cb72d
fix: remove ignored auto-generated attributes
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-06-29 10:18:21 +02:00
ljedrz
01f58dd541
fix: cargo fmt
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-06-26 16:13:37 +02:00
ljedrz
8a942adf3e
refactor: use a type alias for file visit results
...
Signed-off-by: ljedrz <ljedrz@gmail.com>
2020-06-26 15:11:05 +02:00
Joonas Koivunen
87e02703de
chore: update CHANGELOG
2020-06-24 10:38:19 +03:00
Joonas Koivunen
8ef1811f14
refactor: remove/cfg(test) unused of FileReader
2020-06-24 10:25:39 +03:00
Joonas Koivunen
79d6e8c680
fix: hide file::reader
...
Fixes #202 . Apparently this can fail compilation on 1.44. The content
method on FileReader exposes a non-public item through impl
Iterator<Item = (..., non_pub_here)> but still the error is about
lifetime capture.
2020-06-24 10:22:17 +03:00
Joonas Koivunen
e19677ae01
add(unixfs): repository, description, readme
2020-06-18 20:41:32 +03:00
Joonas Koivunen
be1d3b3891
refactor(unixfs): drop unused tar dependency
2020-06-18 20:24:57 +03:00
Joonas Koivunen
9835da8f08
add(unixfs): initial CHANGELOG.md
2020-06-18 20:24:57 +03:00
Joonas Koivunen
740c5f1cd7
chore(unixfs): README, license notes, set version to 0.0.1
2020-06-18 20:24:57 +03:00
Joonas Koivunen
a867cc8e28
chore: cargo fmt
2020-06-17 23:09:05 +03:00
Joonas Koivunen
baa78d6098
fix: forgotten unused error variant (File)
2020-06-17 22:10:42 +03:00
Joonas Koivunen
cc2239abbb
fix: warnings on ipfs_unixfs::walk
2020-06-17 22:09:52 +03:00
Joonas Koivunen
1479b5022a
fix: remove lint suppressions
2020-06-17 22:09:02 +03:00
Joonas Koivunen
0c5ad592a7
doc: add missing "for"
...
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-06-17 17:27:05 +03:00
Joonas Koivunen
a6167fc556
chore: cargo fmt
2020-06-17 17:27:05 +03:00
Joonas Koivunen
c70320dd6c
refactor: suggestions from code review
...
docs, comments and minor API changes again.
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-06-17 17:27:05 +03:00
Joonas Koivunen
b43ec1e9b2
refactor: solidify link conversion
2020-06-17 17:27:05 +03:00
Joonas Koivunen
629e3388b8
refactor: unify InnerKind, switch todos to unreachable
2020-06-17 17:27:05 +03:00
Joonas Koivunen
ee8cab71d9
fix: remove dead code on bucket -> bucket transitions
2020-06-17 17:27:05 +03:00
Joonas Koivunen
7b7ddbbe2b
fix: add back self.depth assertions in set_path
2020-06-17 17:27:05 +03:00
Joonas Koivunen
3bfa506f69
refactor: suggestions from code review
...
Including mostly comment fixes and removal of an extra &mut.
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
2020-06-17 17:27:05 +03:00
Joonas Koivunen
0d2dd477e9
doc: refresh and check out cargo docs
2020-06-17 17:27:05 +03:00
Joonas Koivunen
ed8a2c3d66
doc: update unixfs/README.md and docs
...
added hints about users preferring to use `ipfs_unixfs::walk::Walker`.
2020-06-17 17:27:05 +03:00
Joonas Koivunen
bfd8722ae4
refactor: rename dir submodule to directory
...
also the file was forgotten.
2020-06-17 17:27:05 +03:00
Joonas Koivunen
6be2556341
chore: cargo fmt
2020-06-17 17:27:05 +03:00