archive_r_ruby 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.txt +97 -77
- data/README.md +103 -103
- data/ext/archive_r/archive_r_ext.cc +1106 -1106
- data/ext/archive_r/extconf.rb +125 -120
- data/ext/archive_r/vendor/archive_r/LICENSE.txt +97 -77
- data/ext/archive_r/vendor/archive_r/include/archive_r/data_stream.h +52 -52
- data/ext/archive_r/vendor/archive_r/include/archive_r/entry.h +166 -166
- data/ext/archive_r/vendor/archive_r/include/archive_r/entry_fault.h +34 -34
- data/ext/archive_r/vendor/archive_r/include/archive_r/entry_metadata.h +56 -56
- data/ext/archive_r/vendor/archive_r/include/archive_r/multi_volume_stream_base.h +46 -46
- data/ext/archive_r/vendor/archive_r/include/archive_r/path_hierarchy.h +109 -109
- data/ext/archive_r/vendor/archive_r/include/archive_r/path_hierarchy_utils.h +37 -37
- data/ext/archive_r/vendor/archive_r/include/archive_r/platform_compat.h +19 -19
- data/ext/archive_r/vendor/archive_r/include/archive_r/traverser.h +122 -122
- data/ext/archive_r/vendor/archive_r/src/archive_stack_cursor.cc +324 -330
- data/ext/archive_r/vendor/archive_r/src/archive_stack_cursor.h +112 -97
- data/ext/archive_r/vendor/archive_r/src/archive_stack_orchestrator.cc +162 -162
- data/ext/archive_r/vendor/archive_r/src/archive_stack_orchestrator.h +54 -54
- data/ext/archive_r/vendor/archive_r/src/archive_type.cc +552 -552
- data/ext/archive_r/vendor/archive_r/src/archive_type.h +77 -77
- data/ext/archive_r/vendor/archive_r/src/data_stream.cc +35 -35
- data/ext/archive_r/vendor/archive_r/src/entry.cc +253 -253
- data/ext/archive_r/vendor/archive_r/src/entry_fault.cc +26 -26
- data/ext/archive_r/vendor/archive_r/src/entry_fault_error.cc +54 -54
- data/ext/archive_r/vendor/archive_r/src/entry_fault_error.h +32 -32
- data/ext/archive_r/vendor/archive_r/src/entry_impl.h +57 -57
- data/ext/archive_r/vendor/archive_r/src/multi_volume_manager.cc +81 -81
- data/ext/archive_r/vendor/archive_r/src/multi_volume_manager.h +41 -41
- data/ext/archive_r/vendor/archive_r/src/multi_volume_stream_base.cc +199 -199
- data/ext/archive_r/vendor/archive_r/src/path_hierarchy.cc +151 -151
- data/ext/archive_r/vendor/archive_r/src/path_hierarchy_utils.cc +304 -304
- data/ext/archive_r/vendor/archive_r/src/simple_profiler.h +120 -120
- data/ext/archive_r/vendor/archive_r/src/system_file_stream.cc +299 -295
- data/ext/archive_r/vendor/archive_r/src/system_file_stream.h +46 -46
- data/ext/archive_r/vendor/archive_r/src/traverser.cc +313 -314
- data/lib/archive_r.rb +105 -105
- metadata +3 -10
- data/ext/archive_r/Makefile +0 -273
- data/ext/archive_r/archive_r-x64-mingw-ucrt.def +0 -2
- data/ext/archive_r/archive_r_ext.o +0 -0
- data/ext/archive_r/mkmf.log +0 -40
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
// Copyright (c) 2025 archive_r Team
|
|
3
|
-
|
|
4
|
-
#pragma once
|
|
5
|
-
|
|
6
|
-
#include <cstddef>
|
|
7
|
-
#include <cstdio>
|
|
8
|
-
#include <filesystem>
|
|
9
|
-
#include <string>
|
|
10
|
-
#include <unordered_set>
|
|
11
|
-
#include <vector>
|
|
12
|
-
|
|
13
|
-
#include "archive_r/multi_volume_stream_base.h"
|
|
14
|
-
#include "archive_r/platform_compat.h"
|
|
15
|
-
#include "archive_r/entry_metadata.h"
|
|
16
|
-
#include "archive_r/path_hierarchy.h"
|
|
17
|
-
|
|
18
|
-
namespace archive_r {
|
|
19
|
-
|
|
20
|
-
class SystemFileStream : public MultiVolumeStreamBase {
|
|
21
|
-
public:
|
|
22
|
-
explicit SystemFileStream(PathHierarchy logical_path);
|
|
23
|
-
~SystemFileStream() override;
|
|
24
|
-
|
|
25
|
-
private:
|
|
26
|
-
void open_single_part(const PathHierarchy &single_part) override;
|
|
27
|
-
void close_single_part() override;
|
|
28
|
-
ssize_t read_from_single_part(void *buffer, size_t size) override;
|
|
29
|
-
int64_t seek_within_single_part(int64_t offset, int whence) override;
|
|
30
|
-
int64_t size_of_single_part(const PathHierarchy &single_part) override;
|
|
31
|
-
|
|
32
|
-
void report_read_failure(int err);
|
|
33
|
-
|
|
34
|
-
FILE *_handle;
|
|
35
|
-
std::string _active_path;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
struct FilesystemMetadataInfo {
|
|
39
|
-
uint64_t size = 0;
|
|
40
|
-
mode_t filetype = 0;
|
|
41
|
-
EntryMetadataMap metadata;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
FilesystemMetadataInfo collect_root_path_metadata(const PathHierarchy &hierarchy, const std::unordered_set<std::string> &allowed_keys);
|
|
45
|
-
|
|
46
|
-
} // namespace archive_r
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// Copyright (c) 2025 archive_r Team
|
|
3
|
+
|
|
4
|
+
#pragma once
|
|
5
|
+
|
|
6
|
+
#include <cstddef>
|
|
7
|
+
#include <cstdio>
|
|
8
|
+
#include <filesystem>
|
|
9
|
+
#include <string>
|
|
10
|
+
#include <unordered_set>
|
|
11
|
+
#include <vector>
|
|
12
|
+
|
|
13
|
+
#include "archive_r/multi_volume_stream_base.h"
|
|
14
|
+
#include "archive_r/platform_compat.h"
|
|
15
|
+
#include "archive_r/entry_metadata.h"
|
|
16
|
+
#include "archive_r/path_hierarchy.h"
|
|
17
|
+
|
|
18
|
+
namespace archive_r {
|
|
19
|
+
|
|
20
|
+
class SystemFileStream : public MultiVolumeStreamBase {
|
|
21
|
+
public:
|
|
22
|
+
explicit SystemFileStream(PathHierarchy logical_path);
|
|
23
|
+
~SystemFileStream() override;
|
|
24
|
+
|
|
25
|
+
private:
|
|
26
|
+
void open_single_part(const PathHierarchy &single_part) override;
|
|
27
|
+
void close_single_part() override;
|
|
28
|
+
ssize_t read_from_single_part(void *buffer, size_t size) override;
|
|
29
|
+
int64_t seek_within_single_part(int64_t offset, int whence) override;
|
|
30
|
+
int64_t size_of_single_part(const PathHierarchy &single_part) override;
|
|
31
|
+
|
|
32
|
+
void report_read_failure(int err);
|
|
33
|
+
|
|
34
|
+
FILE *_handle;
|
|
35
|
+
std::string _active_path;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
struct FilesystemMetadataInfo {
|
|
39
|
+
uint64_t size = 0;
|
|
40
|
+
mode_t filetype = 0;
|
|
41
|
+
EntryMetadataMap metadata;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
FilesystemMetadataInfo collect_root_path_metadata(const PathHierarchy &hierarchy, const std::unordered_set<std::string> &allowed_keys);
|
|
45
|
+
|
|
46
|
+
} // namespace archive_r
|