Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,18 +0,0 @@
|
|||
function Compress-RLE ($s) {
|
||||
$re = [regex] '(.)\1*'
|
||||
$ret = ""
|
||||
foreach ($m in $re.Matches($s)) {
|
||||
$ret += $m.Length
|
||||
$ret += $m.Value[0]
|
||||
}
|
||||
return $ret
|
||||
}
|
||||
|
||||
function Expand-RLE ($s) {
|
||||
$re = [regex] '(\d+)(.)'
|
||||
$ret = ""
|
||||
foreach ($m in $re.Matches($s)) {
|
||||
$ret += [string] $m.Groups[2] * [int] [string] $m.Groups[1]
|
||||
}
|
||||
return $ret
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue