Home
Random
Log in
Settings
About Rosetta Code
Disclaimers
Rosetta Code
Search
Run-length encoding: Difference between revisions
Page
Discussion
← Older edit
Newer edit →
Run-length encoding
(view source)
Revision as of 17:22, 4 June 2023
13 bytes removed
,
11 months ago
m
→{{header|V (Vlang)}}
Revision as of 14:54, 4 June 2023
(
view source
)
Wutang
(
talk
|
contribs
)
m
No edit summary
← Older edit
Revision as of 17:22, 4 June 2023
(
view source
)
Wutang
(
talk
|
contribs
)
m
(
→{{header|V (Vlang)}}
)
Newer edit →
Line 6,091:
mut temp := []u8{}
for key, value in data {
if key > 1
&& value != data[key - 1]
{
encode += temp.len.str() + temp[0].ascii_str()
▼
if value != data[key - 1] {
temp.clear()
▼
▲
encode += temp.len.str() + temp[0].ascii_str()
▲
temp.clear()
}
}
temp << value
Wutang
291
edits