@@ -22,7 +22,7 @@ documentation, each serving a different need:
2222
2323| | Purpose | Start here |
2424| ---| ---| ---|
25- | ** [ Tutorial] ( # tutorial-getting-started ) ** | Learning by doing | [ Getting started] ( # tutorial-getting-started ) |
25+ | ** [ Tutorial] ( docs/ tutorial.md ) ** | Learning by doing | [ Getting started] ( docs/ tutorial.md ) |
2626| ** [ How-to guides] ( #how-to-guides ) ** | Solving a specific task | [ Hot paths] ( #compress-on-a-hot-path ) , [ Dictionaries] ( #compress-many-small-payloads-with-a-dictionary ) , [ Zero-copy] ( #avoid-heap-copies-with-memorysegment ) , [ Self-built lib] ( #run-against-a-self-built-libzstd ) |
2727| ** [ Reference] ( #reference ) ** | Looking up facts | [ Platforms] ( #supported-platforms ) , [ API surface] ( #api-surface ) , [ Symbol coverage] ( docs/supported.md ) , [ Build] ( #build-from-source ) |
2828| ** [ Explanation] ( #explanation ) ** | Understanding the why | [ Why FFM + Zig] ( #why-ffm-and-zig ) , [ When zero-copy pays] ( docs/zero-copy.md ) , [ Benchmarks] ( docs/benchmarks.md ) |
@@ -31,40 +31,8 @@ documentation, each serving a different need:
3131
3232## Tutorial: Getting started
3333
34- This walks you from a clean checkout to your first compress/decompress round-trip.
35-
36- ** 1. Clone with the zstd submodule and build.** You need JDK 25+, Maven, and
37- [ Zig] ( https://ziglang.org/ ) on ` PATH ` (Zig is the C compiler for the native lib).
38-
39- ``` bash
40- git clone --recurse-submodules https://github.com/dfa1/zstd-java.git
41- cd zstd-java
42- mvn install
43- ```
44-
45- The build invokes ` scripts/build-zstd.sh ` , compiling ` libzstd ` from the vendored
46- source — no autotools or CMake needed.
47-
48- ** 2. Write your first round-trip.**
49-
50- ``` java
51- import io.github.dfa1.zstd.Zstd ;
52-
53- byte [] original = " hello world" . getBytes();
54- byte [] packed = Zstd . compress(original);
55- byte [] restored = Zstd . decompress(packed); // size read from the frame header
56-
57- assert java.util. Arrays . equals(original, restored);
58- ```
59-
60- ** 3. Run it with native access enabled.** The FFM API requires an explicit flag:
61-
62- ``` bash
63- java --enable-native-access=ALL-UNNAMED Demo.java
64- ```
65-
66- That's the whole loop. From here, pick a [ how-to guide] ( #how-to-guides ) for your
67- actual task, or browse the [ reference] ( #reference ) .
34+ New here? ** [ docs/tutorial.md] ( docs/tutorial.md ) ** takes you from a clean checkout
35+ to your first compress/decompress round-trip, step by step.
6836
6937## How-to guides
7038
0 commit comments