8#ifndef RPNX_CORTADO_JAR_HPP
9#define RPNX_CORTADO_JAR_HPP
41 template <
typename OutputIt >
45 for (std::byte
const byte : bytes)
61 template <
typename OutputIt >
65 for (std::byte
const byte : bytes)
69 throw std::length_error(
"output range is too small for the JAR archive");
85 template < std::forward_iterator InputIt, std::sentinel_for< InputIt > Sentinel >
88 std::vector< std::byte > bytes;
89 for (InputIt cursor = input; cursor != end; ++cursor)
91 bytes.push_back(
static_cast< std::byte
>(*cursor));
Class-file serialization, deserialization, and iterator adapters.
JVM class-file, bytecode, validation, generation, and JAR APIs.
std::vector< std::byte > serialize_jar(jar_file const &value)
Serializes an archive as a non-Zip64 JAR-compatible ZIP file.
jar_file deserialize_jar(std::span< std::byte const > bytes, jar_read_options const &options={})
Deserializes exactly one JAR archive and validates entry sizes and CRC-32 values.
auto serialize_iter(code_body const &value, OutputIt output, bytecode_write_options const &options={}) -> OutputIt
Serial4-style bytecode output-iterator interface.
auto deserialize_iter(code_body &value, InputIt input, Sentinel end, bytecode_read_options const &options={}) -> InputIt
Serial4-style bytecode forward-iterator interface.
An owning JAR archive representation.
Explicit resource limits applied while reading an untrusted JAR archive.