Skip to content

Commit

Permalink
Support typed error
Browse files Browse the repository at this point in the history
  • Loading branch information
1024jp committed Jun 16, 2024
1 parent 56bf51f commit 0dccdd5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
Change Log
==========================

6.2.0
--------------------------

### Changes

- Support typed throw.



6.1.0
--------------------------

Expand Down
4 changes: 2 additions & 2 deletions Sources/Gzip/Data+Gzip.swift
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ extension Data {
/// - Parameter wBits: Manage the size of the history buffer.
/// - Returns: Gzip-compressed `Data` instance.
/// - Throws: `GzipError`
public func gzipped(level: CompressionLevel = .defaultCompression, wBits: Int32 = Gzip.maxWindowBits + 16) throws -> Data {
public func gzipped(level: CompressionLevel = .defaultCompression, wBits: Int32 = Gzip.maxWindowBits + 16) throws(GzipError) -> Data {

guard !self.isEmpty else {
return Data()
Expand Down Expand Up @@ -241,7 +241,7 @@ extension Data {
/// - Parameter wBits: Manage the size of the history buffer.
/// - Returns: Gzip-decompressed `Data` instance.
/// - Throws: `GzipError`
public func gunzipped(wBits: Int32 = Gzip.maxWindowBits + 32) throws -> Data {
public func gunzipped(wBits: Int32 = Gzip.maxWindowBits + 32) throws(GzipError) -> Data {

guard !self.isEmpty else {
return Data()
Expand Down

0 comments on commit 0dccdd5

Please sign in to comment.