Skip to content

Commit

Permalink
Bug fix compression deflate
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciussanchez committed Aug 2, 2023
1 parent 35ba3bf commit c42640d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Horse.Compression.Types.pas
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
unit Horse.Compression.Types;

{$IF DEFINED(FPC)}
{$MODE DELPHI}{$H+}
{$MODE DELPHI}{$H+}
{$ENDIF}

interface

type
Expand Down
2 changes: 1 addition & 1 deletion src/Horse.Compression.pas
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ procedure Middleware(Req: THorseRequest; Res: THorseResponse; Next: {$IF DEFINED
Exit;
LMemoryStream := TMemoryStream.Create;
{$IF DEFINED(FPC)}
LZStream := TCompressionStream.Create(Tcompressionlevel.clmax, LMemoryStream, LResponseCompressionType.WindowsBits = -15);
LZStream := TCompressionStream.Create(Tcompressionlevel.clmax, LMemoryStream, False);
{$ELSE}
LZStream := TZCompressionStream.Create(LMemoryStream, TZCompressionLevel.zcMax, LResponseCompressionType.WindowsBits);
{$ENDIF}
Expand Down

0 comments on commit c42640d

Please sign in to comment.