-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Remove dependency on System.IO.Compression for .NET Framework bu…
…ild, since this package can be consumed by applications with the out-of-band System.IO.Compression NuGet package Details: - Vendor in SharpZipLib v1.3.3 (MIT License) - Remove AssemblyReference to System.IO.Compression - Update Datadog.Trace.Logging.TracerFlare.DebugLogReader to use SharpZipLib instead of System.IO.Compression.ZipArchive - Update Datadog.Trace.Trimming.xml Root Descriptors File - Update snapshot tests that assert Datadog.Trace assembly references
- Loading branch information
1 parent
c0e5e4d
commit 89f01c0
Showing
84 changed files
with
32,129 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
tracer/src/Datadog.Trace/Vendors/ICSharpCode.SharpZipLib/BZip2/BZip2.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated /> | ||
// This file was automatically generated by the UpdateVendors tool. | ||
//------------------------------------------------------------------------------ | ||
#pragma warning disable CS0618, CS0649, CS1574, CS1580, CS1581, CS1584, CS1591, CS1573, CS8018, SYSLIB0011, SYSLIB0023, SYSLIB0032 | ||
using System; | ||
using System.IO; | ||
|
||
namespace Datadog.Trace.Vendors.ICSharpCode.SharpZipLib.BZip2 | ||
{ | ||
/// <summary> | ||
/// An example class to demonstrate compression and decompression of BZip2 streams. | ||
/// </summary> | ||
internal static class BZip2 | ||
{ | ||
/// <summary> | ||
/// Decompress the <paramref name="inStream">input</paramref> writing | ||
/// uncompressed data to the <paramref name="outStream">output stream</paramref> | ||
/// </summary> | ||
/// <param name="inStream">The readable stream containing data to decompress.</param> | ||
/// <param name="outStream">The output stream to receive the decompressed data.</param> | ||
/// <param name="isStreamOwner">Both streams are closed on completion if true.</param> | ||
public static void Decompress(Stream inStream, Stream outStream, bool isStreamOwner) | ||
{ | ||
if (inStream == null) | ||
throw new ArgumentNullException(nameof(inStream)); | ||
|
||
if (outStream == null) | ||
throw new ArgumentNullException(nameof(outStream)); | ||
|
||
try | ||
{ | ||
using (BZip2InputStream bzipInput = new BZip2InputStream(inStream)) | ||
{ | ||
bzipInput.IsStreamOwner = isStreamOwner; | ||
Core.StreamUtils.Copy(bzipInput, outStream, new byte[4096]); | ||
} | ||
} | ||
finally | ||
{ | ||
if (isStreamOwner) | ||
{ | ||
// inStream is closed by the BZip2InputStream if stream owner | ||
outStream.Dispose(); | ||
} | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Compress the <paramref name="inStream">input stream</paramref> sending | ||
/// result data to <paramref name="outStream">output stream</paramref> | ||
/// </summary> | ||
/// <param name="inStream">The readable stream to compress.</param> | ||
/// <param name="outStream">The output stream to receive the compressed data.</param> | ||
/// <param name="isStreamOwner">Both streams are closed on completion if true.</param> | ||
/// <param name="level">Block size acts as compression level (1 to 9) with 1 giving | ||
/// the lowest compression and 9 the highest.</param> | ||
public static void Compress(Stream inStream, Stream outStream, bool isStreamOwner, int level) | ||
{ | ||
if (inStream == null) | ||
throw new ArgumentNullException(nameof(inStream)); | ||
|
||
if (outStream == null) | ||
throw new ArgumentNullException(nameof(outStream)); | ||
|
||
try | ||
{ | ||
using (BZip2OutputStream bzipOutput = new BZip2OutputStream(outStream, level)) | ||
{ | ||
bzipOutput.IsStreamOwner = isStreamOwner; | ||
Core.StreamUtils.Copy(inStream, bzipOutput, new byte[4096]); | ||
} | ||
} | ||
finally | ||
{ | ||
if (isStreamOwner) | ||
{ | ||
// outStream is closed by the BZip2OutputStream if stream owner | ||
inStream.Dispose(); | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.