Skip to content

doc: improve crate documentation#708

Open
Its-Just-Nans wants to merge 3 commits intomasterfrom
improve-doc
Open

doc: improve crate documentation#708
Its-Just-Nans wants to merge 3 commits intomasterfrom
improve-doc

Conversation

@Its-Just-Nans
Copy link
Member

@Its-Just-Nans Its-Just-Nans commented Mar 4, 2026

@Its-Just-Nans Its-Just-Nans self-assigned this Mar 4, 2026
@Its-Just-Nans Its-Just-Nans requested a review from Pr0methean March 4, 2026 01:05
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the project's documentation by centralizing the main crate documentation in the README.md file and enriching its content with more detailed information on supported features, usage examples, and Wasm compatibility. Additionally, several API-level doc comments were refined to provide clearer guidance to users.

Highlights

  • Documentation Restructuring: The primary crate documentation has been moved from src/lib.rs to README.md, making the main project documentation more accessible and consistent across platforms.
  • Improved README Content: The README.md now includes a detailed table of supported compression formats (including read/write capabilities and encryption methods), a reference to the PKWARE APPNOTE.TXT specification, guidance on library usage for reading and writing, and a new section on Wasm compatibility with a feature configuration example.
  • Enhanced API Documentation: Clarifications were added to ZipFile regarding read() buffer guarantees, and ZipWriter examples were improved. Doc comments for set_comment, get_comment, and their ZIP64 counterparts were updated to explicitly mention 'raw' bytes, and internal references were made more consistent.
Changelog
  • Cargo.toml
    • Added .typos.toml to the exclude list.
  • README.md
    • Included a reference to PKWARE's APPNOTE.TXT specification.
    • Replaced the bulleted list of supported compression formats with a comprehensive table detailing read and write support, including AES encryption and ZipCrypto.
    • Updated feature links for chrono and jiff-02 to point to zip::DateTime documentation.
    • Introduced a new 'Library usage' section with links to ZipArchive::new(), ZipWriter::new(), and ZipWriter::new_stream().
    • Adjusted example directory links to be relative.
    • Added a new 'Wasm' section with an example Cargo.toml snippet for Wasm feature configuration.
    • Relocated the 'MSRV' section.
    • Changed 'Fuzzing stdio' heading level from ## to ###.
  • src/lib.rs
    • Replaced extensive module-level documentation with #![doc = include_str!("../README.md")] to pull content directly from README.md.
  • src/read.rs
    • Added a doc comment to ZipFile explaining that read() does not guarantee a full buffer and suggesting read_exact() for complete buffer population.
  • src/write.rs
    • Updated the ZipWriter::new() example for clarity, using cursor and archive variables and adding a commented std::io::copy line.
    • Clarified doc comments for ZipWriter::new_stream() by explicitly referencing std::io::BufWriter.
    • Renamed doc comments for set_comment, get_comment, set_zip64_comment, and get_zip64_comment to include 'raw' for better distinction.
    • Updated a doc comment for ZipWriter::set_file_metadata_from_written_data to use Self::start_file for consistency.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@amazon-q-developer amazon-q-developer bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR improves crate documentation by addressing issues #160, #176, and #172. The changes are documentation-only and do not introduce any logic errors, security vulnerabilities, or functional defects. The PR title follows Conventional Commits format with the correct "doc:" prefix.

No blocking issues found.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request significantly improves the crate's documentation by replacing lists with more readable tables, adding a new section on Wasm usage, and clarifying several doc comments. The changes make the documentation more user-friendly and easier to navigate. I've identified a couple of minor areas for improvement in the documentation to enhance clarity and correctness.

@Its-Just-Nans Its-Just-Nans mentioned this pull request Mar 8, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add docs on working with this crate in WebAssembly create zip file failed with append mode

1 participant