Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 27, 2025

Adds project-specific instructions for the GitHub Copilot coding agent to guide contributions to SharpCompress, a pure C# compression library supporting multiple archive formats.

Changes

AGENTS.md - Enhanced with SharpCompress-specific context:

  • Archive format support matrix (Zip, Tar, 7Zip, Rar, LZip, XZ, ZStandard)
  • Stream disposal patterns (v0.21+ behavior: wrapped streams closed by default, use LeaveStreamOpen or NonDisposingStream to override)
  • Async/await patterns with CancellationToken for I/O operations
  • Archive API (seekable, random access) vs Reader/Writer API (forward-only streaming) usage guidance
  • Format-specific constraints (Tar requires file size in header, Zip64 needs seekable streams, encrypted LZMA unsupported)
  • Testing guidelines for multi-format compression scenarios
  • CSharpier formatting configuration (local tool in .config/dotnet-tools.json)

.github/COPILOT_AGENT_README.md - Corrected references:

  • Fixed filename reference (AGENTS.md not AGENTS.yml)
  • Added .github/agents/copilot-agent.yml to file listing
  • Corrected test project name (SharpCompress.Test not SharpCompress.Tests)

Example Usage

The instructions guide agent to properly handle stream disposal:

// Correct: Explicit control over stream lifecycle
using (var fileStream = File.OpenRead("archive.zip"))
using (var reader = ReaderFactory.Open(fileStream, new ReaderOptions { LeaveStreamOpen = true }))
{
    // Process entries
}
// fileStream still open for further use

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • docs.github.com
    • Triggering command: curl -L REDACTED (dns block)
  • gh.io
    • Triggering command: curl -s REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>✨ Set up Copilot instructions</issue_title>
<issue_description>Configure instructions for this repository as documented in Best practices for Copilot coding agent in your repository.

</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits October 27, 2025 10:57
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Copilot AI changed the title [WIP] Set up Copilot instructions for repository Configure Copilot coding agent instructions for SharpCompress Oct 27, 2025
Copilot AI requested a review from adamhathcock October 27, 2025 11:09
@adamhathcock adamhathcock marked this pull request as ready for review October 27, 2025 12:04
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.

✨ Set up Copilot instructions

2 participants