Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
guzba committed Dec 3, 2020
1 parent 7fe8700 commit a239a5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,16 @@ Compresses src and returns the compressed data.
func compress(src: seq[uint8]): seq[uint8] {.inline, raises: [SnappyError], tags: [].}
```

## **template** uncompress
## **func** uncompress


```nim
template uncompress(src: string): string
func uncompress(src: string): string {.inline, raises: [SnappyError].}
```

## **template** compress
## **func** compress


```nim
template compress(src: string): string
func compress(src: string): string {.inline, raises: [SnappyError].}
```
4 changes: 2 additions & 2 deletions src/supersnappy.nim
Original file line number Diff line number Diff line change
Expand Up @@ -358,13 +358,13 @@ func compress*(src: seq[uint8]): seq[uint8] {.inline.} =
## Compresses src and returns the compressed data.
compress(result, src)

template uncompress*(src: string): string =
func uncompress*(src: string): string {.inline.} =
when nimvm:
vmSeq2Str(uncompress(vmStr2Seq(src)))
else:
cast[string](uncompress(cast[seq[uint8]](src)))

template compress*(src: string): string =
func compress*(src: string): string {.inline.} =
when nimvm:
vmSeq2Str(compress(vmStr2Seq(src)))
else:
Expand Down

0 comments on commit a239a5a

Please sign in to comment.