mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 07:58:58 +01:00
Improve logic
This commit is contained in:
parent
6b5d7ad909
commit
e7d8c746cc
@ -870,12 +870,7 @@ final class TL implements TLInterface
|
||||
*/
|
||||
public static function extractWaveform(string $x): array
|
||||
{
|
||||
$values = \array_values(\unpack('C*', $x));
|
||||
$valuesLength = \count($values);
|
||||
if ($valuesLength < 63) {
|
||||
$addCount = 63 - $valuesLength;
|
||||
\array_push($values, ...\array_fill(0, $addCount, 0));
|
||||
}
|
||||
$values = array_pad(\array_values(\unpack('C*', $x)), 63, 0);
|
||||
|
||||
$result = \array_fill(0, 100, 0);
|
||||
$bitPos = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user