- Notifications
You must be signed in to change notification settings - Fork351
Commit47158f2
authored
s2: Add support for custom stream encoder (#755)
```Go// WriterCustomEncoder allows to override the encoder for blocks on the stream.// The function must compress 'src' into 'dst' and return the bytes used in dst as an integer.// Block size (initial varint) should not be added by the encoder.// Returning value 0 indicates the block could not be compressed.// The function should expect to be called concurrently.func WriterCustomEncoder(fn func(dst, src []byte) int) WriterOption```1 parentfdc8ab0 commit47158f2
3 files changed
+43
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
106 | 128 | | |
107 | 129 | | |
108 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
437 | 438 | | |
438 | 439 | | |
439 | 440 | | |
| |||
799 | 800 | | |
800 | 801 | | |
801 | 802 | | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
802 | 806 | | |
803 | 807 | | |
804 | 808 | | |
| |||
1365 | 1369 | | |
1366 | 1370 | | |
1367 | 1371 | | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
0 commit comments
Comments
(0)