Skip to content

Commit 211733c

Browse files
committed
Update DeterministicPackage.cs
1 parent f7d5a2d commit 211733c

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/DeterministicIoPackaging/DeterministicPackage.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@ public static class DeterministicPackage
88
public static DateTime StableDate { get; } = new(2020, 1, 1, 0, 0, 0, DateTimeKind.Utc);
99
public static DateTimeOffset StableDateOffset { get; } = new(StableDate);
1010

11+
public static MemoryStream Convert(Stream source)
12+
{
13+
var target = new MemoryStream();
14+
Convert(source, target);
15+
target.Position = 0;
16+
return target;
17+
}
18+
19+
public static async Task<MemoryStream> ConvertAsync(Stream source)
20+
{
21+
var target = new MemoryStream();
22+
await ConvertAsync(source, target);
23+
target.Position = 0;
24+
return target;
25+
}
26+
1127
public static void Convert(Stream source, Stream target)
1228
{
1329
using var sourceArchive = ReadArchive(source);

0 commit comments

Comments
 (0)