|
11 | 11 | 7. [Storage Backends](#storage-backends) |
12 | 12 | 8. [Compression and Codecs](#compression-and-codecs) |
13 | 13 | 9. [Advanced Topics](#advanced-topics) |
14 | | -10. [API Reference](#api-reference) |
15 | | -11. [Examples](#examples) |
16 | | -12. [Troubleshooting](#troubleshooting) |
| 14 | +10. [Examples](#examples) |
| 15 | +11. [Troubleshooting](#troubleshooting) |
17 | 16 | --- |
18 | 17 | ## Introduction |
19 | 18 | zarr-java is a Java implementation of the [Zarr specification](https://zarr.dev/) for chunked, compressed, N-dimensional arrays. It supports both Zarr version 2 and version 3 formats, providing a unified API for working with large scientific datasets. |
@@ -678,93 +677,7 @@ try { |
678 | 677 | // For balanced 3D access |
679 | 678 | .withChunkShape(100, 100, 100) // Balanced for all dimensions |
680 | 679 | ``` |
681 | | - |
682 | | -## API Reference |
683 | | -### Array Methods |
684 | | -#### Creation and Opening |
685 | | -- `Array.open(String/Path/StoreHandle)` - Open array |
686 | | -- `Array.create(StoreHandle, ArrayMetadata)` - Create array |
687 | | -- `Array.metadataBuilder()` - Get metadata builder |
688 | | -#### Reading |
689 | | -- `read()` - Read entire array (parallel by default) |
690 | | -- `read(long[] offset, long[] shape)` - Read subset (parallel by default) |
691 | | -- `read(boolean parallel)` - Read entire array, specify parallelism |
692 | | -- `read(long[] offset, long[] shape, boolean parallel)` - Read subset with parallelism control |
693 | | -- `readChunk(long[] chunkCoords)` - Read single chunk |
694 | | - |
695 | | -**Note:** Methods without a `parallel` parameter default to **parallel** (`true`) processing. |
696 | | - |
697 | | -#### Writing |
698 | | -- `write(ucar.ma2.Array)` - Write at origin (parallel by default) |
699 | | -- `write(long[] offset, ucar.ma2.Array)` - Write at offset (parallel by default) |
700 | | -- `write(ucar.ma2.Array, boolean parallel)` - Write at origin with parallelism control |
701 | | -- `write(long[] offset, ucar.ma2.Array, boolean parallel)` - Write at offset with parallelism control |
702 | | -- `writeChunk(long[] chunkCoords, ucar.ma2.Array)` - Write chunk |
703 | | - |
704 | | -**Note:** Methods without a `parallel` parameter default to **parallel** (`true`) processing. |
705 | | -#### Metadata |
706 | | -- `resize(long[] newShape)` - Resize (metadata only) |
707 | | -- `resize(long[] newShape, boolean resizeMetadataOnly)` - Resize with cleanup option |
708 | | -- `resize(long[] newShape, boolean resizeMetadataOnly, boolean parallel)` - With option to disable parallelism |
709 | | -- `setAttributes(Attributes)` - Set attributes |
710 | | -- `updateAttributes(Function<Attributes, Attributes>)` - Update attributes |
711 | | -- `metadata()` - Get metadata |
712 | | -#### Utility |
713 | | -- `access()` - Get fluent accessor API |
714 | | -### Group Methods |
715 | | -#### Creation and Opening |
716 | | -- `Group.open(String/Path/StoreHandle)` - Open group |
717 | | -- `Group.create(StoreHandle)` - Create group |
718 | | -- `Group.create(StoreHandle, Attributes)` - Create with attributes |
719 | | -#### Navigation |
720 | | -- `list()` - Get stream of all child nodes |
721 | | -- `listAsArray()` - Get array of all child nodes |
722 | | -- `get(String key)` - Get member by key |
723 | | -- `get(String[] key)` - Get member by multi-part key |
724 | | -#### Children |
725 | | -- `createGroup(String key)` - Create subgroup |
726 | | -- `createGroup(String key, Attributes)` - Create subgroup with attributes |
727 | | -- `createArray(String key, ArrayMetadata)` - Create array |
728 | | -#### Metadata |
729 | | -- `setAttributes(Attributes)` - Set group attributes |
730 | | -- `metadata()` - Get group metadata |
731 | | -### Store Implementations |
732 | | -- `FilesystemStore(String/Path)` - Local filesystem |
733 | | -- `HttpStore(String url)` - HTTP/HTTPS (read-only) |
734 | | -- `S3Store(S3Client s3client, String bucketName, String prefix)` - AWS S3 |
735 | | -- `MemoryStore()` - In-memory |
736 | | -- `ReadOnlyZipStore(String path)` - ZIP (read-only) |
737 | | -- `BufferedZipStore(String path)` - ZIP (read/write) |
738 | | -### ArrayMetadataBuilder Methods (v3) |
739 | | -- `withShape(long... shape)` - Set array shape |
740 | | -- `withDataType(DataType)` - Set data type |
741 | | -- `withChunkShape(int... chunkShape)` - Set chunk shape |
742 | | -- `withFillValue(Object)` - Set fill value |
743 | | -- `withCodecs(Function<CodecBuilder, CodecBuilder>)` - Configure codecs |
744 | | -- `withAttributes(Attributes)` - Set attributes |
745 | | -- `build()` - Build metadata |
746 | | -### CodecBuilder Methods (v3) |
747 | | -- `withBlosc()` - Add Blosc (default settings) |
748 | | -- `withBlosc(String cname)` - Add Blosc with compressor |
749 | | -- `withBlosc(String cname, int clevel)` - Add Blosc with compressor and level |
750 | | -- `withBlosc(String cname, String shuffle, int clevel)` - Add Blosc fully configured |
751 | | -- `withGzip(int level)` - Add Gzip |
752 | | -- `withZstd(int level)` - Add Zstd |
753 | | -- `withTranspose(int[] order)` - Add transpose |
754 | | -- `withSharding(int[] chunksPerShard, Function<CodecBuilder, CodecBuilder>)` - Add sharding |
755 | | -### ArrayMetadataBuilder Methods (v2) |
756 | | -- `withShape(long... shape)` - Set array shape |
757 | | -- `withDataType(DataType)` - Set data type |
758 | | -- `withChunks(int... chunks)` - Set chunk shape |
759 | | -- `withFillValue(Object)` - Set fill value |
760 | | -- `withBloscCompressor()` - Use Blosc (default) |
761 | | -- `withBloscCompressor(String cname)` - Blosc with compressor |
762 | | -- `withBloscCompressor(String cname, int clevel)` - Blosc with settings |
763 | | -- `withBloscCompressor(String cname, String shuffle, int clevel)` - Blosc fully configured |
764 | | -- `withZlibCompressor(int level)` - Use Zlib |
765 | | -- `withAttributes(Attributes)` - Set attributes |
766 | | -- `build()` - Build metadata |
767 | | ---- |
| 680 | + |
768 | 681 | ## Examples |
769 | 682 | ### Complete Example: Creating a 3D Dataset |
770 | 683 | ```java |
|
0 commit comments