assafvayner HF Staff commited on
Commit
fe77549
Β·
1 Parent(s): f39a207

update readme

Browse files
Files changed (2) hide show
  1. APP_README.md +0 -98
  2. README.md +66 -27
APP_README.md DELETED
@@ -1,98 +0,0 @@
1
- # XORB & Shard File Viewer
2
-
3
- A static web application built with Svelte that allows you to upload and analyze XORB or Shard object files to view their metadata structure.
4
-
5
- ## Features
6
-
7
- - **File Upload**: Drag & drop or click to upload XORB and Shard files
8
- - **Automatic Detection**: Automatically detects file type based on binary structure
9
- - **Comprehensive Metadata Display**: Shows detailed information about file contents
10
- - **Responsive Design**: Works on desktop and mobile devices
11
- - **Error Handling**: Provides clear error messages for invalid files
12
-
13
- ## Supported File Types
14
-
15
- ### πŸ“¦ XORB Files
16
-
17
- XORB (Xet Orb) files contain collections of compressed chunks with metadata. The viewer displays:
18
-
19
- - Chunk count and sizes
20
- - Compression ratios
21
- - Hash information
22
- - Boundary offsets
23
- - Individual chunk details
24
-
25
- ### πŸ—‚οΈ Shard Files
26
-
27
- MDB Shard files store file metadata and content-addressable storage information for efficient deduplication. The viewer shows:
28
-
29
- - File information entries
30
- - CAS (Content Addressable Storage) data
31
- - Lookup tables
32
- - Timestamps and security keys
33
- - Header and footer details
34
-
35
- ## Development
36
-
37
- ### Prerequisites
38
-
39
- - Node.js 18+
40
- - pnpm (or npm/yarn)
41
-
42
- ### Setup
43
-
44
- ```bash
45
- cd xorb-shard-viewer
46
- pnpm install
47
- pnpm run dev
48
- ```
49
-
50
- The application will be available at `http://localhost:5173`
51
-
52
- ### Build for Production
53
-
54
- ```bash
55
- pnpm run build
56
- ```
57
-
58
- The static files will be generated in the `build` directory.
59
-
60
- ## File Format Support
61
-
62
- The application implements binary parsers for:
63
-
64
- - **XORB Format**: Based on the CAS object format with chunk compression and merkle hashing
65
- - **Shard Format**: MDB shard file format v2 with header, footer, file info, and CAS info sections
66
-
67
- ## Architecture
68
-
69
- - **Frontend**: Svelte + TypeScript
70
- - **Parsing**: Custom binary parsers for both file formats
71
- - **Styling**: Component-scoped CSS with responsive design
72
- - **Type Safety**: Full TypeScript support with detailed type definitions
73
-
74
- ## Browser Compatibility
75
-
76
- Works in all modern browsers that support:
77
-
78
- - File API
79
- - ArrayBuffer/Uint8Array
80
- - ES2020+ features
81
-
82
- ## Security
83
-
84
- - All file processing happens client-side
85
- - No data is uploaded to any server
86
- - Files are processed entirely in the browser's memory
87
-
88
- ## Contributing
89
-
90
- 1. Fork the repository
91
- 2. Create a feature branch
92
- 3. Make your changes
93
- 4. Test thoroughly
94
- 5. Submit a pull request
95
-
96
- ## License
97
-
98
- See the parent repository's LICENSE file for licensing information.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md CHANGED
@@ -11,50 +11,89 @@ license: mit
11
  short_description: Display the contents of a xorb or a shard
12
  ---
13
 
14
- # Svelte + TS + Vite
15
 
16
- This template should help get you started developing with Svelte and TypeScript in Vite.
17
 
18
- ## Recommended IDE Setup
19
 
20
- [VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).
 
 
 
 
21
 
22
- ## Need an official Svelte framework?
23
 
24
- Check out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.
25
 
26
- ## Technical considerations
27
 
28
- **Why use this over SvelteKit?**
 
 
 
 
29
 
30
- - It brings its own routing solution which might not be preferable for some users.
31
- - It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.
32
 
33
- This template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.
34
 
35
- Should you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.
 
 
 
 
36
 
37
- **Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?**
38
 
39
- Setting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information.
40
 
41
- **Why include `.vscode/extensions.json`?**
 
42
 
43
- Other templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.
44
 
45
- **Why enable `allowJs` in the TS template?**
 
 
 
 
46
 
47
- While `allowJs: false` would indeed prevent the use of `.js` files in the project, it does not prevent the use of JavaScript syntax in `.svelte` files. In addition, it would force `checkJs: false`, bringing the worst of both worlds: not being able to guarantee the entire codebase is TypeScript, and also having worse typechecking for the existing JavaScript. In addition, there are valid use cases in which a mixed codebase may be relevant.
48
 
49
- **Why is HMR not preserving my local component state?**
50
 
51
- HMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/rixo/svelte-hmr#svelte-hmr).
 
 
52
 
53
- If you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.
54
 
55
- ```ts
56
- // store.ts
57
- // An extremely simple external store
58
- import { writable } from "svelte/store";
59
- export default writable(0);
60
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  short_description: Display the contents of a xorb or a shard
12
  ---
13
 
14
+ # XORB & Shard File Viewer
15
 
16
+ A static web application built with Svelte that allows you to upload and analyze XORB or Shard object files to view their metadata structure.
17
 
18
+ ## Features
19
 
20
+ - **File Upload**: Drag & drop or click to upload XORB and Shard files
21
+ - **Automatic Detection**: Automatically detects file type based on binary structure
22
+ - **Comprehensive Metadata Display**: Shows detailed information about file contents
23
+ - **Responsive Design**: Works on desktop and mobile devices
24
+ - **Error Handling**: Provides clear error messages for invalid files
25
 
26
+ ## Supported File Types
27
 
28
+ ### πŸ“¦ XORB Files
29
 
30
+ XORB (Xet Orb) files contain collections of compressed chunks with metadata. The viewer displays:
31
 
32
+ - Chunk count and sizes
33
+ - Compression ratios
34
+ - Hash information
35
+ - Boundary offsets
36
+ - Individual chunk details
37
 
38
+ ### πŸ—‚οΈ Shard Files
 
39
 
40
+ MDB Shard files store file metadata and content-addressable storage information for efficient deduplication. The viewer shows:
41
 
42
+ - File information entries
43
+ - CAS (Content Addressable Storage) data
44
+ - Lookup tables
45
+ - Timestamps and security keys
46
+ - Header and footer details
47
 
48
+ ## Development
49
 
50
+ ### Prerequisites
51
 
52
+ - Node.js 18+
53
+ - pnpm (or npm/yarn)
54
 
55
+ ### Setup
56
 
57
+ ```bash
58
+ cd xorb-shard-viewer
59
+ pnpm install
60
+ pnpm run dev
61
+ ```
62
 
63
+ The application will be available at `http://localhost:5173`
64
 
65
+ ### Build for Production
66
 
67
+ ```bash
68
+ pnpm run build
69
+ ```
70
 
71
+ The static files will be generated in the `build` directory.
72
 
73
+ ## File Format Support
74
+
75
+ The application implements binary parsers for:
76
+
77
+ - **XORB Format**: Based on the CAS object format with chunk compression and merkle hashing
78
+ - **Shard Format**: MDB shard file format v2 with header, footer, file info, and CAS info sections
79
+
80
+ ## Architecture
81
+
82
+ - **Frontend**: Svelte + TypeScript
83
+ - **Parsing**: Custom binary parsers for both file formats
84
+ - **Styling**: Component-scoped CSS with responsive design
85
+ - **Type Safety**: Full TypeScript support with detailed type definitions
86
+
87
+ ## Browser Compatibility
88
+
89
+ Works in all modern browsers that support:
90
+
91
+ - File API
92
+ - ArrayBuffer/Uint8Array
93
+ - ES2020+ features
94
+
95
+ ## Security
96
+
97
+ - All file processing happens client-side
98
+ - No data is uploaded to any server
99
+ - Files are processed entirely in the browser's memory