CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/proto/iax2/codecs/mu_law.rb
Views: 11766
1
# -*- coding: binary -*-
2
module Rex
3
module Proto
4
module IAX2
5
module Codecs
6
class MuLaw < G711
7
8
9
def self.decode(buff)
10
buff.unpack("C*").map{ |x| LOOKUP_ULAW2LIN16[x] }.pack('v*')
11
end
12
13
end
14
end
15
end
16
end
17
end
18
19