Delphi-Quellcode:
function ArrayShl(arr: array of byte; count: integer): array of byte;
var i, offset: integer;
begin
offset := count div (8 * sizeof(arr[0]));
count := count mod (8 * sizeof(arr[0]));
SetLength(result, arr - offset);
for i := 0 to high(result) - 1 do
result[i] := (arr[i + offset] shl count) or (arr[i + offset + 1] shr (8 * sizeof(arr[0]) - count));
result[high(result)] := arr[high(arr)] shl count;
end;
Nicht getestet, aber sollte so gehen. Glaub ich