Libraryless. Click here for Pure Java version (7301L/43K).
1 | sclass JE_RepByte extends JEInstantCompressor { |
2 | scaffolded public IJavaExpr compress(LByte data) { |
3 | bool sc = scaffoldingEnabled(this); |
4 | if (empty(data)) null; |
5 | byte b = first(data); |
6 | int n = l(data); |
7 | for (int i = 1; i < n; i++) |
8 | if ((byte) data.get(i) != b) { |
9 | if (sc) scaffoldCalled(this, "diff at " + i + "/" + n); |
10 | null; |
11 | } |
12 | ret functionCall repByte(n, b); |
13 | } |
14 | } |
Began life as a copy of #1033093
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033095 |
Snippet name: | JE_RepByte |
Eternal ID of this version: | #1033095/12 |
Text MD5: | f2a1c4f9a204554f9a074dea34b42cce |
Transpilation MD5: | 6ee673384b8c5719de899d1b4aeee623 |
Author: | stefan |
Category: | javax / recognition by compression |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-16 04:07:57 |
Source code size: | 424 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 210 / 354 |
Version history: | 11 change(s) |
Referenced in: | [show references] |