Double-weight optical orthogonal codes are variable-weight optical orthogonal codes (OOCs), which have been widely applied in optical networks and systems. Some works have been devoted to optimal
n
,
W
,
1
,
Q
-OOCs with
max
w
:
w
∈
W
≤
6
. So far, there is no explicit construction of optimal
n
,
W
,
1
,
Q
-OOCs with
W
=
5,7
. It is known that heavier-weight codewords have better code performance than lighter-weight codewords. So, in this paper, we use cyclic packing to construct two infinite classes of optimal OOCs with weights set
5,7
explicitly, for any prime
p
≡
3
mod
4
and
p
≥
7
. In addition, for
1
≤
t
<
p
−
1
/
2
, by breaking
t
blocks of size 7 into 3 of
31
p
,
5,7
,
1
,
1
/
2
,
1
/
2
-OOCs and
41
p
,
5,7
,
1
,
2
/
3
,
1
/
3
-OOCs, we obtain new infinite classes of optimal
31
p
,
3,5,7
,
1
,
7
t
/
p
−
1
+
6
t
,
p
−
1
/
2
p
−
1
+
6
t
,
p
−
1
−
2
t
/
2
p
−
1
+
6
t
-OOCs and
41
p
,
3,5,7
,
1
,
14
t
/
3
p
−
1
+
4
t
,
2
p
−
1
/
3
p
−
1
+
4
t
,
p
−
1
−
2
t
/
3
p
−
1
+
4
t
-OOCs, respectively.