Skip to content

Commit

Permalink
feat: apply compression suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
pichlermarc committed Feb 22, 2024
1 parent 638bc6f commit c762e17
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,7 @@ const GRPC_COMPRESSION_NONE = 0;
const GRPC_COMPRESSION_GZIP = 2;

function toGrpcCompression(compression: 'gzip' | 'none'): number {
if (compression === 'none') {
return GRPC_COMPRESSION_NONE;
} else if (compression === 'gzip') {
return GRPC_COMPRESSION_GZIP;
}
return GRPC_COMPRESSION_NONE;
return compression === 'gzip' ? GRPC_COMPRESSION_GZIP : GRPC_COMPRESSION_NONE;
}

export function createInsecureCredentials(): ChannelCredentials {
Expand Down

0 comments on commit c762e17

Please sign in to comment.